A method for predicting the performance of a cast part
Patent Information
- Application Number
- CN202610848658.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-09-29
AI Technical Summary
这一试错过程耗时数周甚至数月,成本高昂,且难以保证寻得全局最优解
1.本发明针对铸造工艺数据的高维特性和非线性关联特性,采用集成学习算法构建成分-工艺-性能的正向预测模型;能够自动挖掘各特征间的深层次耦合关系,实现对铸造件抗拉强度、屈服强度、伸长率、硬度等力学性能指标的高精度预测。本发明引入自适应加权权重输出,量化各输入特征对输出性能的贡献程度,增强了预测结果的可信度和工程实用性,使得铸造工程师能够理解模型决策依据并据此调整生产参数。
Smart Images

Figure CN122839797A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parts casting technology, and specifically to a method for predicting the performance of cast parts. Background Technology
[0002] In the automotive parts casting industry, with the deepening trend of lightweighting and high performance in new energy vehicles, the requirements for the mechanical properties of parts made of materials such as aluminum alloy and high-strength cast iron are becoming increasingly stringent.
[0003] Taking commercial die-cast aluminum alloys as an example, the number of alloying and impurity elements often exceeds 10 (such as Si, Cu, Mg, Mn, Fe, Zn, Ni, Cr, etc.), and each element has a nonlinear influence on mechanical properties to varying degrees. In actual production, the furnace charge ratio before the furnace (chemical composition ratio, as well as pig iron, scrap steel, recycled materials, iron filings, etc.), the actual chemical composition after the furnace, and heat treatment process parameters such as unpacking time, melting temperature, and pouring speed all significantly affect the performance of the final product. Traditional quality prediction methods are mainly based on statistical process control theory and physical metallurgical models. Among them, multiple linear regression is the most common method. Researchers use experimental data as a basis and statistical analysis software such as Minitab and SPSS to establish empirical regression equations between alloy composition and performance indicators such as tensile strength, yield strength, and hardness. However, these methods are significantly insufficient in predictive accuracy and adaptability when faced with multi-element interactions and nonlinear relationships.
[0004] Traditional methods suffer from incomplete input dimensions and neglect key factors throughout the casting process. Most existing methods only focus on the relationship between alloy chemical composition and mechanical properties, without systematically integrating heat treatment process parameters such as unpacking time, melting temperature, and pouring speed. This results in incomplete input information for the prediction model, limited prediction accuracy, and difficulty in meeting the high requirements for quality consistency.
[0005] Cast alloys often contain more than 10 alloying and impurity elements, and there are complex nonlinear synergistic and antagonistic effects between these elements and with process parameters. The ability to model high-dimensional, nonlinear relationships is insufficient, allowing only unidirectional predictions. Engineers need to conduct rounds of experiments to find the appropriate mix proportions and process solutions that meet the target performance. This trial-and-error process can take weeks or even months, is costly, and makes it difficult to guarantee finding the globally optimal solution. Therefore, there is an urgent need to develop a method for predicting the performance of cast parts to address the aforementioned problems. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention proposes a method for predicting the performance of cast parts, which solves the problems existing in the prior art. Specifically, it predicts the mechanical properties of cast parts through a forward model and inversely deduces the chemical composition and furnace charge ratio from the target performance through a reverse model.
[0007] The technical solution adopted in this invention includes: Collect historical data on cast parts, including pre-furnace characteristic data and post-furnace characteristic data; An adaptive weighted single-path residual network is constructed to initialize the pre-furnace feature data and post-furnace feature data; Based on the initial data, the forward propagation loss of a single round is calculated in batches to obtain the loss value between the predicted performance value and the actual performance value of the part. Based on the loss value, adaptive weight calculation is performed, and adaptive multi-scale feature fusion is carried out to obtain the final predicted value; Based on the final predicted value and the actual performance value, calculate the total loss data between the final predicted value and the actual performance value, and perform backpropagation to complete the training of the first batch of initial data; then perform training of the second batch of initial data, until the training of all batches of initial data is completed; After initializing the data and training, load the saved optimal model parameters, perform forward propagation on the initial dataset, output four performance prediction values, and calculate R0. 2 Evaluation metrics such as MAE and RMSE are used to assess model performance. Based on the optimal model, input the pre-furnace characteristic data and post-furnace characteristic data of the cast parts to predict the performance of the cast parts.
[0008] Furthermore, the furnace front characteristic data includes the furnace front chemical composition ratio and the proportion data of pig iron, scrap steel, recycled materials, and iron filings in the furnace charge; The post-furnace characteristic data includes post-furnace chemical composition ratio data; and process parameters of the heat treatment process such as unpacking time, dissolution temperature, and pouring speed.
[0009] Furthermore, the furnace-front and furnace-back feature data are initialized to construct an adaptive weighted single-path residual network, including a shallow feature extraction layer, a deep feature extraction layer, an output feature extraction layer, and an adaptive weight calculation layer. The furnace-front and furnace-back feature data are initialized using the Xavier initialization method, and the Adam optimizer is established and the HuberLoss loss function is constructed for calculation.
[0010] Furthermore, the single-round forward propagation loss calculation includes calculating the initial data in batches. The initial data after batching is first extracted by a shallow feature layer to obtain a shallow feature vector f1. The f1 vector is input into the output feature extraction layer to obtain the first output Y1.
[0011] Furthermore, the deep feature extraction layer consists of at least one linear residual block. Vector f1 is passed as input to the deep feature extraction layer to obtain a deep feature vector f2. Vector f2 is then input to the output feature extraction layer to obtain a second output Y2. Finally, f2 is input to the deep feature extraction layer to obtain Y3, as expressed in the following expression: in As the activation function, calculate separately. , , Loss value between actual performance value , , The expression is as follows: .
[0012] Furthermore, in the initialization data training, a batch of initialization data training is completed, forward propagation is performed on the validation set in the initialization data, the average loss on the validation set in the initialization data is calculated, and the loss is compared with the historical best loss. If the current loss is less than the historical best loss, the current model parameters are saved as the best model; otherwise, training continues without saving.
[0013] Furthermore, the adaptive weight calculation includes: The weights W1, W2, and W3 of each output layer are calculated based on the relative magnitudes of the loss values L1, L2, and L3, as expressed by: Next, calculate the reciprocal of the loss for each layer, and then obtain the weight values through Softmax normalization. The final predicted value y is expressed as: .
[0014] Furthermore, the backpropagation is performed using the total loss Ltotal between the final predicted value and the true value. The expressions for Ltotal and backpropagation are as follows: Where θ represents all trainable parameters of the entire network. This represents the gradient calculation operation, which updates all parameters of the entire network through the Adam optimizer. After each batch of data is trained, the gradient is cleared and the next batch is started.
[0015] Furthermore, the four performance prediction values are used to calculate R. 2 The MAE and RMSE evaluation metrics are used to assess model performance, and their expressions are as follows: in, For the true value, For predicted values, The average of the true values. This represents the number of samples.
[0016] Furthermore, the present invention provides a computer storage medium storing a computer program that can run on a processor, wherein the processor executes the computer program to implement the casting part performance prediction method described in any one of the above-mentioned methods.
[0017] As can be seen from the above technical solution, the beneficial technical effects of the present invention are as follows: 1. This invention addresses the high-dimensionality and nonlinear correlation characteristics of casting process data by employing an ensemble learning algorithm to construct a positive prediction model of composition-process-performance. It automatically uncovers deep-seated coupling relationships between various features, achieving high-precision prediction of mechanical properties of castings such as tensile strength, yield strength, elongation, and hardness. This invention introduces adaptive weighted output to quantify the contribution of each input feature to the output performance, enhancing the reliability and engineering applicability of the prediction results. This allows casting engineers to understand the model's decision-making basis and adjust production parameters accordingly.
[0018] 2. This invention takes the target performance value as input and recommends a furnace pre-mixing scheme and heat treatment process parameters that meet the target performance requirements through a constructed inverse mapping model. The mix ratio and process scheme obtained from the inverse recommendation are input into the forward performance prediction model for simulation verification, and the expected performance value is calculated and compared with the target value error. If the verification result does not meet the accuracy requirements, the recommended scheme is automatically adjusted through an optimization algorithm until the optimal mix ratio and process combination that meets the target performance is found. This saves time and effort and greatly reduces the investment cost of research and development. Attached Figure Description
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0020] Figure 1 This is a data processing flowchart of the present invention; Figure 2 This is a structural diagram of the storage medium of the present invention; Figure 3 This is a flowchart of the training process for pre-furnace feature data and post-furnace feature data according to the present invention. Figure 4 This is a schematic diagram of the adaptive weighted single-path residual network structure of the present invention; Figure 5 This is a schematic diagram of the single-path residual network structure for deep feature extraction according to the present invention; Figure 6 A schematic diagram of the adaptive weighted dual-path residual network structure in Embodiment 2 of the present invention. Detailed Implementation
[0021] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.
[0022] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application should have the ordinary meaning as understood by those skilled in the art to which this invention pertains.
[0023] Example 1 like Figure 1 As shown, this embodiment provides a method for predicting the performance of cast parts; Collect historical data on cast parts, including pre-furnace characteristic data and post-furnace characteristic data; The aforementioned furnace front characteristic data includes the furnace front chemical composition ratio and the proportion data of pig iron, scrap steel, recycled materials, and iron filings in the furnace charge; The post-furnace characteristic data includes post-furnace chemical composition ratio data; and process parameters of the heat treatment process such as unpacking time, dissolution temperature, and pouring speed.
[0024] An adaptive weighted single-path residual network is constructed to initialize the pre-furnace feature data and post-furnace feature data; Based on the initial data, the forward propagation loss of a single round is calculated in batches to obtain the loss value between the predicted performance value and the actual performance value of the part. Based on the loss value, adaptive weight calculation is performed, and adaptive multi-scale feature fusion is carried out to obtain the final predicted value; Based on the final predicted value and the actual performance value, calculate the total loss data between the final predicted value and the actual performance value, and perform backpropagation to complete the training of the first batch of initial data; then perform training of the second batch of initial data, until the training of all batches of initial data is completed; After initializing the data and training, load the saved optimal model parameters, perform forward propagation on the initial dataset, output four performance prediction values, and calculate R0. 2 Evaluation metrics such as MAE and RMSE are used to assess model performance. Based on the optimal model, input the pre-furnace characteristic data and post-furnace characteristic data of the cast parts to predict the performance of the cast parts.
[0025] The process involves initializing the pre-furnace and post-furnace feature data, constructing an adaptive weighted single-path residual network, including a shallow feature extraction layer, a deep feature extraction layer, an output feature extraction layer, and an adaptive weight calculation layer. The Xavier initialization method is used to initialize the pre-furnace and post-furnace feature data. An Adam optimizer is established, and a HuberLoss loss function is constructed for calculation. The HuberLoss loss function can simultaneously eliminate the shortcomings of both MSE and MAE, combining their advantages. Its expression is: In the formula, For the true value of the sample, For the predicted value of the sample, The optimizer's initial learning rate is a hyperparameter. HuberLoss loss function =1.0. The magnitude of the value determines HuberLoss's emphasis on MSE and MAE. When it becomes MSE; When the value is less than 0, it becomes similar to MAE. Therefore, HuberLoss combines the advantages of both MSE and MAE, reducing the sensitivity to outliers and achieving differentiability everywhere.
[0026] In this embodiment, the single-round forward propagation loss calculation includes calculating the initial data in batches. The batched initial data is first extracted by a shallow feature layer to obtain shallow feature vectors. The expression is as follows: In the formula, and These are weights and biases, respectively; GELU is the activation function; LN is the normalization function; and Dropout is the activation function. Will The vector input is fed into the output feature extraction layer to obtain the first output. The expression is: .
[0027] In this embodiment, the deep feature extraction layer consists of at least one linear residual block. The expression is: Will The vector is passed as input to the deep feature extraction layer to obtain the deep feature vector. The expression is: In the formula, Indicates the first Each residual block will The vector input and output feature extraction layer obtains a second output. , and then Input deep feature extraction layer to obtain The expression is: in As the activation function, calculate separately. , , Loss value between actual performance value , , The expression is as follows: .
[0028] In this embodiment, during the initialization data training, a batch of initialization data training is completed, forward propagation is performed on the validation set in the initialization data, the average loss on the validation set in the initialization data is calculated, and the loss is compared with the historical best loss. If the current loss is less than the historical best loss, the current model parameters are saved as the best model; otherwise, training continues without saving.
[0029] In this embodiment, as Figure 3 The adaptive weight calculation includes: Based on the loss value , , The relative size is used to calculate the weights of each output layer. , , The expression is: The inverse of the loss for each layer is then calculated, and the weights are obtained through Softmax normalization. This mechanism assigns higher weights to layers with better performance (lower loss) and lower weights to layers with poorer performance (higher loss), thus achieving adaptive multi-scale feature fusion. The final predicted value is then obtained. The expression is: .
[0030] In this embodiment, the backpropagation uses the total loss between the final predicted value and the true value. Perform backpropagation. The expressions for backpropagation are as follows: in, This represents all trainable parameters of the entire network. This represents the gradient calculation operation, which updates all parameters of the entire network through the Adam optimizer. After each batch of data is trained, the gradient is cleared and the next batch is started.
[0031] In this embodiment, the four performance prediction values are used to calculate R. 2 The MAE and RMSE evaluation metrics are used to assess model performance, and their expressions are as follows: in, For the true value, For predicted values, The average of the true values. This represents the number of samples.
[0032] In this embodiment, as Figure 2 A computer storage medium is provided, on which a computer program executable by a processor is stored, wherein the processor executes the computer program to implement the casting part performance prediction method described in any one of the above-mentioned methods.
[0033] Example 2 This embodiment is basically the same as Embodiment 1, except that: the data before the furnace and the data after the furnace are used as two independent inputs; this embodiment performs three Concat feature fusions after shallow feature extraction, after deep feature extraction, and before the output layer, so that the model can integrate the information from the two data sources at different levels of abstraction.
[0034] Specifically, such as Figures 4-6 The model is initialized by constructing an adaptive weighted dual-path residual network, including two independent shallow feature extraction layers, two independent deep feature extraction layers, two independent output feature extraction layers, three concatenation layers, three output linear layers, and one adaptive weight calculation layer. Xavier initialization is used, with a learning rate set to [value missing]. Adam optimizer.
[0035] Specifically, dual-path forward propagation and feature fusion are used to process the furnace front data (set as follows). The data is sent to the first network channel, and the data after the furnace is set to... The data is fed into the second network, and the two data streams undergo forward propagation in parallel. First, they pass through their respective independent shallow feature extraction layers, resulting in two shallow feature vectors, expressed as follows: in, These are shallow features of the furnace front data extracted from the first branch. This represents the shallow features extracted from the post-furnace data of the second branch. Subsequently, a Concat operation is used to concatenate these features into a single fused shallow feature set. The expression is as follows: in This represents the Concat operation, which merges shallow features. The input is fed into the first output linear layer to obtain The calculation method is the same as that of Scheme 1. same.
[0036] Subsequently, two shallow feature vectors , The data are fed into two independent deep feature extraction layers, resulting in the following deep feature vectors for the two branches: In the formula, Indicates the first branch road One residual block, Indicates the second branch road One residual block. But , The ways of expression are all the same as The same. Then, after concatenating the layers using Concat, the result is the second output linear layer. The expression is as follows: Finally, the features output from the two deep feature extraction layers are... , By inputting the data into two independent output feature extraction layers, the output features of the two branches are obtained as follows: After being concatenated again using Concat, the result is obtained through a third output layer. : .
[0037] Example 3 This embodiment is basically the same as Embodiment 2, except that a central logarithmic transformation is added in the data preprocessing stage. Chemical composition data has a definite sum constraint characteristic where the sum of each component is 100%, which leads to inherent spurious correlations between data. Directly using the original component data will introduce multicollinearity, affecting the training effect and prediction stability of the model. Specifically, a central logarithmic transformation (CLR) is performed. A central logarithmic transformation is applied to the 29 chemical composition data before and after the furnace. Let the 29 chemical composition vectors be (…). The CLR transform expression is as follows: This transformation maps the data from simplex space to Euclidean space, eliminating definite sum constraints.
[0038] Specifically, the standardization process involves standardizing the pre-furnace and post-furnace data after the central logarithmic transformation, ensuring that each feature has zero mean and unit variance. The standardization parameters (mean and standard deviation) are calculated only on the training set and then applied to the validation and test sets to avoid data leakage.
[0039] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.
Claims
1. A method for predicting the performance of cast parts, characterized in that, include: Collect historical data on cast parts, including pre-furnace characteristic data and post-furnace characteristic data; An adaptive weighted single-path residual network is constructed to initialize the pre-furnace feature data and post-furnace feature data; Based on the initial data, the forward propagation loss of a single round is calculated in batches to obtain the loss value between the predicted performance value and the actual performance value of the part. Based on the loss value, adaptive weights are calculated, and adaptive multi-scale feature fusion is performed to obtain the final predicted value. Based on the final predicted value and the actual performance value, calculate the total loss data between the final predicted value and the actual performance value, and perform backpropagation to complete the training of the first batch of initial data. Then, the second batch of initial data is used for training, until all batches of initial data training are completed; After initializing the data and training, load the saved optimal model parameters, perform forward propagation on the initial dataset, output four performance prediction values, and calculate R0. 2 Evaluation metrics such as MAE and RMSE are used to assess model performance. Based on the optimal model, input the pre-furnace characteristic data and post-furnace characteristic data of the cast parts to predict the performance of the cast parts.
2. The method for predicting the performance of cast parts according to claim 1, characterized in that, The aforementioned furnace front characteristic data includes the furnace front chemical composition ratio and the proportion data of pig iron, scrap steel, recycled materials, and iron filings in the furnace charge; The post-furnace characteristic data includes post-furnace chemical composition ratio data; and process parameters of the heat treatment process such as unpacking time, dissolution temperature, and pouring speed.
3. The method for predicting the performance of cast parts according to claim 1, characterized in that, The process involves initializing the pre-furnace and post-furnace feature data, constructing an adaptive weighted single-path residual network, including a shallow feature extraction layer, a deep feature extraction layer, an output feature extraction layer, and an adaptive weight calculation layer. The Xavier initialization method is used to initialize the pre-furnace and post-furnace feature data. An Adam optimizer is established, and the HuberLoss loss function is constructed for calculation, with the expression: In the formula, For the true value of the sample, For the predicted value of the sample, The optimizer's initial learning rate is a hyperparameter. HuberLoss loss function =1.
0.
4. The method for predicting the performance of cast parts according to claim 1, characterized in that, The single-round forward propagation loss calculation includes calculating the initial data in batches. The batched initial data is first extracted by a shallow feature layer to obtain shallow feature vectors. ; The expression is as follows: In the formula, and These are weights and biases, respectively; GELU is the activation function; LN is the normalization function; and Dropout is the activation function. Will The vector input is fed into the output feature extraction layer to obtain the first output. The expression is: 。 5. A method for predicting the performance of cast parts according to any one of claims 3 or 4, characterized in that, The deep feature extraction layer consists of at least one linear residual block. The residual block The expression is: Will The vector is passed as input to the deep feature extraction layer to obtain the deep feature vector. The expression is: In the formula, Indicates the first Each residual block will The vector input and output feature extraction layer obtains a second output. Then Input deep feature extraction layer to obtain The expression is: in As the activation function, calculate separately. , , Loss value between actual performance value , , The expression is as follows: 。 6. The method for predicting the performance of cast parts according to claim 1, characterized in that, In the initialization data training, a batch of initialization data training is completed. Forward propagation is performed on the validation set in the initialization data. The average loss on the validation set in the initialization data is calculated. This loss is compared with the historical best loss. If the current loss is less than the historical best loss, the current model parameters are saved as the best model; otherwise, training continues without saving.
7. The method for predicting the performance of cast parts according to claim 1, characterized in that, The adaptive weight calculation includes: Based on the loss value , , The relative size is used to calculate the weights of each output layer. , , The expression is: Then calculate the reciprocal of the loss for each layer, and then obtain the weight values through Softmax normalization to get the final predicted value. The expression is: 。 8. The method for predicting the performance of cast parts according to claim 1, characterized in that, The backpropagation described uses the total loss between the final predicted value and the true value. Perform backpropagation. The expressions for backpropagation are as follows: in, This represents all trainable parameters of the entire network. This represents the gradient calculation operation, which updates all parameters of the entire network through the Adam optimizer. After each batch of data is trained, the gradient is cleared and the next batch is started.
9. The method for predicting the performance of cast parts according to claim 1, characterized in that, The four performance prediction values are used to calculate R. 2 The MAE and RMSE evaluation metrics are used to assess model performance, and their expressions are as follows: in, For the true value, For predicted values, The average of the true values. This represents the number of samples.
10. A computer storage medium storing a computer program executable on a processor, characterized in that, When the processor executes the computer program, it implements a method for predicting the performance of cast parts according to any one of claims 1-9.