Residual stress prediction method based on neural network
By converting the contour method data into explicit equations and loading them into the finite element model, the data processing and technical problems of the contour method in large and complex sections are solved, the efficient prediction of complex residual stress fields is achieved, the simulation efficiency and accuracy are improved, and it is suitable for special-shaped components with complex structures.
Patent Information
- Application Number
- CN202510588797.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-09-19
AI Technical Summary
The existing contour method lacks unified standards for data processing and finite element loading processes in large and complex cross-section measurements. The calculation time is lengthy, the computer computing power requirements are high, and the grid density setting is complex, resulting in low detection efficiency.
A neural network-based method is used to convert the stress-induced deformation data of parts into explicit equations and load them into the finite element model to predict the complex residual stress field. By coupling the neural network with the finite element method, the grid density requirements are simplified and the displacement boundary conditions are directly loaded.
It achieves efficient prediction of complex residual stress fields, improves simulation efficiency and accuracy, simplifies the meshing process, reduces calculation time, and is suitable for special-shaped components with complex structures.
Smart Images

Figure CN120671432A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a residual stress prediction method based on a neural network, and belongs to the field of measurement characterization. Background Art
[0002] Residual stress refers to internal stress that exists in a material in equilibrium when no external load is applied. It is caused by uneven plastic deformation and phase changes within the material. During material manufacturing, processing, and surface strengthening, external loads and temperature fluctuations can cause local elastic deformation, resulting in irreversible residual strains and the generation of residual stress. Residual stress forms local strain energy within the material. When external conditions disrupt this equilibrium, the strain energy is released, causing macroscopic deformation.
[0003] Residual stress has a crucial impact on the service performance of materials, and its induced deformation is one of the core challenges restricting high-precision manufacturing. The prerequisite for controlling residual stress is to obtain an accurate initial stress field. Existing residual stress measurement methods mainly include destructive and non-destructive methods. Destructive methods, such as the blind hole method and the profile method, require the material to be destroyed and the residual stress distribution is inferred based on the material's deformation. Non-destructive methods mainly include X-ray diffraction, ultrasound, neutron diffraction, and other methods. These methods are mainly used to measure residual stress in the surface and sub-surface layers of materials. For deep-level and large-scale internal stress detection, the profile method is the preferred method due to its strong penetration ability and high spatial resolution. Compared with other commonly used residual stress measurement techniques, the profile method can obtain a two-dimensional distribution cloud map of the normal residual stress of the target plane. Through multiple cuts, the three-dimensional residual stress field can be reconstructed, which is beneficial for revealing stress gradients and stress concentration areas within the part. The profile method has low test costs, high data reliability, and avoids dependence on material constitutive models, making it suitable for industrial field applications. Even so, there's no unified standard for data processing using the contour method or for loading contour data using finite element methods. It's generally accepted that the spacing between contour points in three-coordinate measurement should be consistent with the mesh density of the finite element model to ensure a one-to-one correspondence between contour points and finite element nodes, reducing finite element calculation errors. When measuring large, complex cross-sections, this consistent correspondence between nodes and test points is almost impossible. Furthermore, the sheer volume of contour data presents a significant challenge to finite element meshing. A high mesh density, however, means lengthy calculation times and places high demands on computer computing power. Summary of the Invention
[0004] In order to solve the above problems, the main purpose of the present invention is to provide a residual stress prediction method based on neural network, which converts the data contour of the stress-induced deformation of the part into an explicit equation and loads it into the finite element model for calculation, so as to realize the efficient prediction of complex residual stress fields.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] The present invention discloses a residual stress prediction method based on a neural network, comprising the following steps:
[0007] Step 1: Test and process part contour deformation data;
[0008] After the part is cut, the cut surface deforms due to the release of internal residual stress. The contour data of the deformed section is measured using a three-dimensional coordinate measuring machine. The contour deformation data is subjected to noise reduction and smoothing processing to compensate for the measurement error and obtain training samples.
[0009] Step 2: Build the optimal training model;
[0010] Using the LM algorithm, the network is trained multiple times based on the training samples obtained in step 1. A fixed random seed is used to ensure reproducible results. The error of each training is saved to select the optimal training model.
[0011] Step 3: Analyze the mathematical expression of the network and convert the optimal training model into an explicit equation that can be embedded in the physical model;
[0012] Step 4: Construct a prediction model for part cross-section deformation induced by residual stress release;
[0013] In the finite element simulation software, a geometric model of the workpiece section is established and meshed, and displacement constraints are set on the section. The explicit equation obtained in step 3 is loaded into the user subroutine to obtain the section stress field, thereby realizing the prediction of the residual stress.
[0014] The training sample in step 2 contains 4 columns [coordinate X, coordinate Y, coordinate Z, deformation ε]. The constructed neural network architecture has 3 nodes in the input layer, 5 nodes in the hidden layer, and 1 node in the output layer.
[0015] The explicit equation described in step 3 is:
[0016]
[0017] tansig(x) is the hyperbolic tangent activation function, see formula (6); is the denormalized input layer weight matrix, corresponding to the weight of the physical dimension; is the denormalized input layer bias vector, is the output layer weight vector after denormalization; is the output layer bias scalar after denormalization.
[0018] Denormalized input layer weight matrix Expressed as:
[0019]
[0020] w 11 is the normalized input layer weight matrix; iMax and iMin are the maximum and minimum value vectors of the input data respectively. The output layer weight vector after denormalization Expressed as:
[0021]
[0022] w 22 is the normalized output layer weight vector; oMax and oMin are the maximum and minimum values of the output data respectively.
[0023] Denormalized input layer bias vector Expressed as:
[0024]
[0025] b1 is the normalized input layer bias vector of iMax.
[0026] Output layer bias scalar after denormalization Expressed as:
[0027]
[0028] b2 is the normalized output layer bias scalar.
[0029] Beneficial effects:
[0030] 1. The present invention discloses a residual stress testing method based on a neural network, which couples the neural network with the finite element method. By analyzing the forward propagation process of the network after cross-sectional profile training, it is converted into an explicit mathematical expression and embedded in the finite element model as the displacement boundary condition, thereby realizing efficient prediction of complex residual stress fields and being more suitable for special-shaped components with complex structures.
[0031] 2. The present invention discloses a residual stress testing method based on a neural network. By calling a subroutine to load the displacement boundary conditions, compared with the traditional loading method, there is no need to set the grid density the same as the test point spacing, nor to consider the correspondence between the unit nodes and the test points, which greatly improves the simulation efficiency and the residual stress prediction accuracy.
[0032] 3. The present invention discloses a neural network-based residual stress testing method. The contour data loaded into the finite element model comes from the mathematical expression inversely solved after neural network training. In step 1, only the contour value data volume needs to be guaranteed, without considering the setting of test points for complex parts. Furthermore, in step 4, the meshing process of complex structural parts does not need to be strictly controlled. Compared with other testing methods, this method has the advantages of simple equipment and convenient calculation, and can more quickly obtain residual stress values for complex cross-sections. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A residual stress testing method based on a neural network disclosed in the present invention;
[0034] Figure 2 This is the flow chart of the simulation test;
[0035] Figure 3 Schematic diagram of the changes in stress field and displacement field during stress release process;
[0036] Figure 4 Comparison diagram of cross-section normal stress prediction; Figure a is the true stress cloud diagram of the cross section; Figure b is the stress cloud diagram predicted by the traditional loading method; Figure c is the stress cloud diagram predicted by the neural network combined with the subroutine; Figure d is the stress cloud diagram predicted with low grid density and high efficiency. DETAILED DESCRIPTION
[0037] In order to better illustrate the purpose and advantages of the present invention, the invention is further described below with reference to the accompanying drawings and examples.
[0038] Example 1:
[0039] like Figure 1 As shown, the present embodiment discloses a residual stress prediction method based on a neural network, which includes the following steps in the process of simulating and predicting the residual stress distribution of a ZL702A sample:
[0040] Step 1: Test and process part contour deformation data.
[0041] The essence of the contour method is that it does not introduce other stresses during the process of cutting the section to be measured by slow wire cutting. The surface to be measured loses the constraint of the cutting part, which releases stress and causes deformation. The following method is used to simulate the contour method test process to verify the effectiveness of this prediction method. A workpiece model is established in the finite element simulation software, the initial stress field is defined, and a symmetric constraint is applied to a certain surface of the workpiece. Figure 2 As shown in the figure, during the simulation operation, the symmetry constraints are released to simulate material removal. At this time, the cross-section stress is released and deformation occurs. The node coordinates and cross-section normal displacement after deformation are batch extracted to simulate the actual three-coordinate measurement cross-section profile data process. The extracted profile data is used as a neural network training sample.
[0042] like Figure 3 As shown in the figure, the section to be measured has an initial stress field before cutting. The entire process is the evolution of the initial residual stress field into the normal displacement field of the section. By extracting and analyzing the displacement field data, the original stress field can be reversely inferred. This prediction method uses a neural network to assist in the inversion calculation. The extracted contour data is stored in the form of [coordinate X, coordinate Y, coordinate Z, deformation ε], which serves as training samples for subsequent steps.
[0043] Step 2: Build the optimal training model.
[0044] The contour information extracted in step 1 is as follows Figure 2 As shown in the figure, an artificial neural network model is constructed. This model is based on a BP neural network and consists of an input layer, a hidden layer, and an output layer. The input layer contains three neurons corresponding to coordinates X, Y, and Z, and the output layer has one neuron that outputs the predicted deformation. The hidden layer activation function uses the hyperbolic tangent sigmoid function (tansig) to handle nonlinear relationships, while the output layer activation function is a linear function (purelin) to ensure that the predicted values are not restricted by the range.
[0045]
[0046] purelin(x)=x (7)
[0047] To obtain high-precision cross-sectional deformation data and adapt it to the input requirements of the neural network, the contour data was preprocessed before training. Since the cross-sectional deformation due to stress release was too small, the data was uniformly expanded by two orders of magnitude to improve training stability. The input (X, Y, Z) and output (ε) were normalized to the range [-1, 1], as shown in Equation 1.
[0048]
[0049] x norm is the normalized input or output value in the range of [-1, 1], and x is the physical value of the original input or output.
[0050] The training set, validation set, and test set were divided into 8:1:1 ratios. The Levenberg-Marquardt optimization algorithm was used to repeatedly train the network to screen the model with the best generalization performance and avoid local optimal solutions. The random seed was fixed to ensure the reproducibility of the results. Finally, the model with the smallest validation set error was selected as the final network and the weight parameters were saved.
[0051] Step 3: Analyze the mathematical expression of the network and convert the optimal training model into an explicit equation that can be embedded in the physical model.
[0052] Load the optimal training model, extract the weights and bias values, restore the normalized parameters within the network to physical dimensions, and reversely deduce the physical values of the weights and biases. The final explicit equation is as follows:
[0053]
[0054] in:
[0055]
[0056] is the denormalized input layer weight matrix, corresponding to the weight of physical dimensions; w 11 is the normalized input layer weight matrix; iMax and iMin are the maximum and minimum value vectors of the input data respectively; is the input layer bias vector after denormalization, b1 is the input layer bias vector of iMax after normalization; is the denormalized output layer weight vector, w 22 is the normalized output layer weight vector; oMax and oMin are the maximum and minimum values of the output data respectively; is the output layer bias scalar after denormalization, and b2 is the output layer bias scalar after normalization.
[0057] Step 4: Construct a prediction model for part cross-section deformation induced by residual stress release.
[0058] In the finite element simulation software, the workpiece geometric model is established and the mesh is divided. The displacement equation (1) after analysis is loaded through the user subroutine. The displacement boundary conditions are set at the target section. The program is written to load the section profile displacement data and perform simulation calculations to solve the section stress field. The results are as follows: Figure 4 As shown in c.
[0059] During the verification of this prediction method, the actual stress distribution of the cross section is shown in Figure a, and the predicted stress using the traditional contour data loading method is shown in Figure b. Compared with the actual stress distribution of the cross section to be measured, the accuracy of the values predicted by this method and the traditional method are both within 5%, but the computational efficiency of this method is higher, and the simulation efficiency has been improved by 39%. It is worth mentioning that this method can be used to load contour data without strictly limiting the grid density. A finite element model with the same geometric structure and a smaller grid density is re-established and the contour data is applied using this method for simulation calculations. The calculation results are shown in Figure 2. Figure 4 As shown in Figure d, the simulation results lose some precision, with a 16% error from the actual stress of the cross section. However, the simulation time is reduced from 3 hours to 30 seconds, significantly improving computational efficiency. The model used in this example uses a small size and simple geometric surface to verify the correctness and effectiveness of the present invention. The effect will be even more significant when applied to large-scale and complex cross-sections.
[0060] The above specific description further illustrates the purpose, technical solutions and beneficial effects of the invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. 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 residual stress prediction method based on a neural network, characterized by: The following steps are included: Step 1: Test and process part contour deformation data; After the part is cut, the cut surface deforms due to the release of internal residual stress. A three-dimensional coordinate measuring machine is used to measure the contour data of the deformed section. The contour deformation data is subjected to noise reduction and smoothing processing to compensate for the measurement error and obtain training samples. Step 2: Build the optimal training model; Using the LM algorithm, the network is trained multiple times based on the training samples obtained in step 1. A fixed random seed is used to ensure reproducible results. The error of each training is saved to select the optimal training model. Step 3: Analyze the mathematical expression of the network and convert the optimal training model into an explicit equation that can be embedded in the physical model; Step 4: Construct a prediction model for part cross-section deformation induced by residual stress release; In the finite element simulation software, a geometric model of the workpiece section is established and meshed, and displacement constraints are set on the section. The explicit equation obtained in step 3 is loaded into the user subroutine to obtain the section stress field, thereby realizing the prediction of the residual stress.
2. The residual stress prediction method based on a neural network according to claim 1, characterized in that: The explicit equation described in step 3 is: tansig(x) is the hyperbolic tangent activation function; is the denormalized input layer weight matrix, corresponding to the weight of the physical dimension; is the denormalized input layer bias vector, is the output layer weight vector after denormalization; is the output layer bias scalar after denormalization.
3. The residual stress prediction method based on a neural network according to claim 2, characterized in that: Denormalized input layer weight matrix Expressed as: w 11 is the normalized input layer weight matrix; iMax and iMin are the maximum and minimum value vectors of the input data respectively.
4. The residual stress prediction method based on a neural network according to claim 2, characterized in that: The denormalized output layer weight vector Expressed as: w 22 is the normalized output layer weight vector; oMax and oMin are the maximum and minimum values of the output data respectively.
5. The residual stress prediction method based on a neural network according to claim 2, characterized in that: Denormalized input layer bias vector Expressed as: b1 is the normalized input layer bias vector of iMax.
6. The residual stress prediction method based on a neural network according to claim 2, characterized in that: Output layer bias scalar after denormalization Expressed as: b2 is the normalized output layer bias scalar.
7. The residual stress prediction method based on a neural network according to claim 1, characterized in that: The training sample in step 2 contains 4 columns [coordinate X, coordinate Y, coordinate Z, deformation ε].
8. The residual stress prediction method based on a neural network according to claim 1, characterized in that: The constructed network architecture contains 3 nodes in the input layer, 5 nodes in the hidden layer, and 1 node in the output layer.