## 2 Inverse Method
### Inverse Strategy  
The inverse problem is essentially an optimisation problem, which aims to minimise the difference between the simulation and experimental results. The FEMU method is one of the commonly used inverse methods and has been successfully applied to the parameter identification of a variety of materials. However, owing to the complexity of the finite element method in calculating residual stress, the inverse approach based on the FEMU method is rarely used for residual stress determination. In this paper, an inverse method using a neural network is proposed to replace the finite element program. Without compromising accuracy, this method can not only determine the complete residual stress distribution base on the stress values of finite measuring points, but also reduce the calculation time dramatically.  
To obtain the residual stress of structural components under different process and boundary conditions, selecting the appropriate inverse parameters is of prime importance. In a thermal analysis, when the element temperature and coefficient of thermal expansion are provided, the finite element model can generate a stress field satisfying the self-equilibrium equation. Based on this, complex and diverse stress fields can be realised by applying random temperature and coefficient of thermal expansion at the integration point of each element in a finite element model. However, it should be noted that the temperature field in this method is fictitious and is only used as a means to obtain the residual stress, or to simulate any process conditions that produce the residual stress field. To determine the residual stress field, the optimisation task of this study is to determine the temperature distribution which can minimise the difference between the measured residual stresses and the inversely calculated residual stresses under a particular coefficient of thermal expansion. In fact, when the material properties are provided, the optimisation algorithm can always find a temperature field satisfying the convergence criterion of the objective function by adjusting the temperatures of the elements. Therefore, in this inverse method, all parameters are set as given constants except the element temperature.  
To minimise the difference between the inversely calculated and measured residual stresses, the objective function was established as follows:  
\[Q=\sum_{i}^{N}\left[\sum_{j}^{M}\left(\sigma_{j}^{CNN}(T_{i},\alpha)-\sigma_{ j}^{EXP}(T_{i},\alpha)\right)^{2}\right]_{i}\bigg{/}N \tag{1}\]  
where \(\alpha\) and \(T_{i}\) are the coefficient of thermal expansion and element temperature, respectively, \(N\) is the total number of measured points and \(M\) represents the number of stress components. For a planar problem, the stress components include \(\sigma_{x}\), \(\sigma_{y}\) and \(\tau_{xy}\), so \(M=3\). Further, \(\sigma_{j}^{CNN}\) is the stress at the integration point of each element calculated by neural network and \(\sigma_{j}^{EXP}\) is the measured residual stress at the corresponding position.  
Figure 1 shows the flow chart of the inverse method based on the CNN. The inverse strategy mainly includes three steps, residual stress measurement, CNN establishment and parameter optimisation. For the first step, to verify the proposed inverse method, the stress field created by a simulated four-point bending experiment of an elastic-plastic material was used as the residual stress field in this paper. The second step involves a series of skills such as pre-processing, training and post-processing of the neural network. In the final step, the optimisation algorithm is used to update the temperature in each element to minimise the objective function (Equation (1)).