High-precision deformation prediction for compliant parts in the ship sub-assembly process

In the ship sub-assembly process, large compliant parts are common and generally thin. These compliant parts are normally easy to deform under the influence of gravity, which will greatly affect the accuracy of the sub-assembly processes. Thus, it is important to predict the deformation of the compliant part under a given fixture layout in advance. In current practice, existing methods of post-compensation are usually used to correct the deformation of the compliant part, which are inefficient and costly. In this paper, a transformer-based surrogate model with two-stage Latin hypercube sampling (TSM-TSS) is established. This surrogate model considers each fixture position and its deviation to predict the deformation of the entire compliant part. Compared with BPNN and Kriging, a case study reveals that TSM-TSS can predict the deformation of compliant parts with an error of 0.061mm. With the application of TSM-TSS, the deformation of the compliant part under gravity can be predicted accurately and the efficiency of shipbuilding can be improved.


Introduction
At present, there are numbers of compliant parts in the ship sub-assembly process.These compliant parts used in ships are generally thin [1], where the ratio of the part thickness to the length or the width is 0.001-0.012[2].Such parts are easily deformed under the influence of gravity and will introduce various defects in the welding process, greatly reducing the final sub-assembly quality.However, most of the deformations of the compliant parts that occur in the actual ship manufacturing process are adjusted afterward to make the deformations meet the tolerance requirements.This is time-consuming and inefficient.Therefore, how to quickly and precisely obtain the overall deformation under a given fixture layout to ensure the size quality, and provide adjustment opinions for the sub-assembly process has been important work.
To evaluate the performance of different fixture layouts, finite element analysis (FEA) is introduced to model the variable workpiece and calculate the corresponding deformation [3].Cai et al. proposed the 'N-2-1' (N>3) locating principle and further used FEA and non-linear programming methods to find the best N locating points [4].Liu et al. used Genetic Algorithm (GA) and Finite Element Analysis (FEA) to optimize fixture layout in automobile dashboard manufacturing systems [5].Vinosh et al. introduced a new design technology of spot welding fixtures for sheet metal [6].Kang et al. used FEA to build a model to predict the clamping deformation under different clamping pressures in the vacuum fixture workpiece system [7].A metric used in robotic grasping theory to quantify the quality of the locating scheme is proposed by Slon et al. [8].Liao et al. used finite element analysis (FEA) to minimize workpiece deflection due to clamping forces under the 3-2-1 fixture scheme [9].
It is important to reduce the intensive finite element analysis and calculation carried out by FEA software in the deformation process of parts with known fixture layouts.Thus a series of surrogate models, such as response surfaces (RS), artificial neural network (ANN), and kriging model, have been proposed for fixture layout design in recent years [10][11][12][13][14][15][16][17][18].However, these methods have not been applied to the fixture layout design and deformation calculation of the compliant part.It is because the sizes of compliant parts in a ship are quite large and thus complex computations are required.Therefore, existing methods need to be improved to make them suitable for the deformation calculation of large compliant parts.
Furthermore, some scholars try to obtain an accurate solution rather than approximate solutions from traditional surrogate models.Du et al. proposed a methodology for the optimal design of the fixture layout in the ship assembly process by systematically integrating the direct stiffness method and simulated annealing algorithm [19].However, this method with high accuracy is time-consuming when it is applied to a large number of feasible nodes and a large number of fixtures.It will limit its application in practical shipbuilding processes.
In this paper, a novel approach TSM-TSS is proposed to calculate the single compliant part deviation prediction results under the current fixture layout by using the known fixture deviation and position.The framework of the proposed TSM-TSS method is shown in Figure 1.Our methodology is under the 'N-2-1' principle and mainly aims to get prediction results of the overall deformation of the compliant part accurately.This novel surrogate model considers each fixture position and its deviation and uses these results to predict the deformation of the entire compliant part.First of all, we present the TSS for the design of experiments (DOE).After obtaining the training and the test sets, this surrogate model is trained.It is worth noting that with TSM-TSS, we can quickly calculate the overall deformation of the compliant part under a given layout.In addition, compared with the results of BPNN and Kriging, it can be proved that TSM-TSS achieves high-precision prediction on the deformation of compliant parts, and further, improves the quality and efficiency of sub-assembly.

Problem definition
Due to the large shape and thin characteristics of the compliant part, it is easy to deform greatly under the influence of gravity.From an engineering point of view, the deformation of the compliant part should be reduced as much as possible because the huge deformation of the compliant part will greatly affect the accuracy of the sub-assembly process.Therefore, it is significant to predict the deformation of the compliant part under the existing fixture layout in advance.
To predict the deformation of the compliant part efficiently and accurately, TSM-TSS is proposed.Compared with analytical physics-based models [20,21] and numerical-simulation models [22,23], surrogate models are flexible and computationally efficient.As a result, TSM is built to predict the deformation of the compliant part.In addition, compared with other traditional surrogate models, TSM can encode position information into the feature, and achieve high-precision deformation prediction.Moreover, it is acknowledged that the accuracy of the surrogate model is highly correlated with the sampling method.Therefore, to obtain random and comprehensive sampling data, the traditional Latin hypercube sampling is improved, and TSS is designed.Our TSM-TSS method can quickly calculate the deformation under the current fixture layout for the compliant part with high accuracy compared with other methods.

An overview of the TSM-TSS method 2.2.1. Introduction to TSM.
To achieve a better network prediction effect, traditional CNN and RNN are abandoned in the transformer, and the whole network structure is completely composed of an Attention mechanism [24].As shown in Figure 2(a), the transformer consists of four parts: input layers, encoder blocks, decoder blocks, and output layers.Encoder blocks and decode blocks are composed of self-attention layers, feed-forward layers, and normalization layers, and these are the main structures for learning input features.In traditional surrogate models, after inputting variables, the calculation can only be performed from one direction (from left to right or from right to left).However, the deviation at each fixture is related to the position of the fixture, resulting in the loss of information during sequential calculation.

MEIE-2023 Journal of Physics: Conference Series 2591 (2023) 012021
To make full use of the position information of the fixtures, the transformer is used to establish a surrogate model.The TSM built in our study is shown in Figure 2(b).The TSM consists of input layers, encoder blocks, and output layers.Different from the translation scenarios frequently used by the transformer in the past, TSM only needs to extract features without reconstructing them and decoder blocks are no longer needed to be built as part of the TSM.The flow of training TSM is as follows.Firstly, the finite element model (FEM) is established according to the actual physical characteristics of the compliant part.With feature extraction, each fixture position and its deviation are integrated as a variable ∈ and the output variable is represented as the average deformation in Equation (1): where , , … , represents the 4k-dimensional input points vector.is the number of fixtures in each fixture layout.∈ , 1,2, … , denotes the total deformation and the position of the node. is the number of finite element nodes in the compliant part., , are linear displacements of the node in the x-, y-, and z-directions, respectively.Then, a full connection layer is used to linearly transform the input, and the position information is embedded into features to improve the prediction ability of TSM.The coding formula of position information can be expressed as Equation ( 2 where is the number of channels after is processed by the linear layer and the positionembedding layer.To capture long-range dependencies, several encoders are used in our proposed TSM to enhance the model feature fusion capability.In addition, the encoder can also realize parallel computing to improve the efficiency of model training.Finally, through a full connection layer, fused features are weighted and summed to calculate the average deformation of the compliant part under the current fixture layout.

Sampling strategy: two-stage Latin hypercube sampling.
Many LHS methods that can be applied to different scenes are designed [25][26][27].However, due to the curved shape of the compliant part and the high standard requirements for sampling, the existing methods cannot be used directly.Sometimes, those methods will sample some points where the fixtures cannot be placed or points that are not in the compliant parts area, which should be avoided as much as possible.The proposed TSS method can be well applied to sampling problems of compliant parts.With the use of the TSS, random samples can be obtained and adequate sampling points are acquired to ensure both comprehensiveness and uniformity.An overview of the main steps in our TSS method is shown in Figure 3.
The main steps of TSS are described as follows: 1) First, the physical model and actual physical parameters of compliant parts are input into the finite element simulation software ABAQUS to establish the FEM.After that, the coordinates and node numbers of each node are output to form the sampling space.It is assumed that there are fixtures needed to support the compliant part.According to engineering knowledge, a composite number is usually chosen to factor it and assume .2) Assume that the abscissa is divided first.To get regions, 1 boundary dividing points , 1, … , 1 are needed.They are obtained by LHS using the abscissa distribution of all nodes: with obtaining the cumulative distribution value (3) 3) For each region, LHS is conducted according to the y-coordinate distribution in the region to obtain 1 boundary dividing points.After obtaining regions, the ordinates distributions  4): 4) After such a round of operation, the compliant part is divided into regions and one position is randomly selected from each region as the placement point of the fixture.Different fixture layouts of groups can be obtained by repeating this process times.The above steps reveal that the TSS is superior to other sampling methods because it can divide the compliant parts according to their coordinate distribution, ensuring that the samples obtained must be feasible.In addition, since the TSS ensures that samples will be collected in places where nodes of compliant parts are sparsely distributed, and prevents excessive sampling in places where nodes are densely distributed, this method can ensure full coverage of sample space.Notably, the accuracy of the surrogate model is closely related to the training set obtained by sampling.Therefore, the accuracy of fixture layout prediction can be effectively improved by sampling as comprehensively as possible.

Design of indicators and loss.
To quantitatively measure the performance of the proposed TSM, mean absolute error (MAE) and average output error between the real and predicted deformation value of each node are introduced to evaluate models.The average output error and MAE are calculated by Equation ( 5) and Equation ( 6), respectively: where and are the true and predicted deformation values of the node, respectively.N is the number of finite element nodes in the compliant part.
To obtain better training results and accelerate the model convergence, loss is used, which can be expressed by Equation (7): where is the batch size when training models.

Problem statement
To reduce the deformation caused by gravity in the ship sub-assembly process, a large number of fixtures on the primary datum are placed on the ground (x-y plane), where the height in the z-direction can be adjusted according to the surface of the part.
In this case study, a large compliant part at the bow is used as an example.Figure 4(a) shows its geometry.The lengths of the four sides for this part are 5600mm, 4600mm, 5500mm, and 3200mm, respectively.It has 6 mm thick and the density, Young's modulus, and Poisson's ratio of the compliant part are 7.85×10 −3 g/mm 3 , 210,000N/mm 2 , and 0.3, respectively.To calculate the value of the evaluation function after sampling and better analyse the deformation of parts under the support of fixtures, FEA models are established via ABAQUS 6.14 as shown in Figure 4(b).Specifically, the compliant part is meshed with 2240 S4R elements and 15 S3R elements, thereby indicating the total number of nodes is 2343.The size of elements is 100mm × 100mm and the gravity is evenly distributed on the part whose direction is in the negative direction of the z coordinate.

Details of TSM-TSS
The TSS method provides 4947 groups of sample data in total, of which 4617 groups are used as training data sets, and the remaining 330 groups are used as validation data sets.The fixture layout for one of the sample data can be seen in Figure 5(a) and the red points are the positions of the fixtures.Notably, FEA simulation can exactly simulate real cases with high accuracy in terms of linear elastic deformation calculation [28].As a result, all of those sample data are calculated by FEM based on Section 3.1 and the result in Figure 5(b) shows the overall deformation of the compliant part in one case.In our study, there are a total of 25 fixtures in each fixture layout, that is, =25.After feature extraction, each input variable is formulated as ∈ , including the deviation of the node where the fixture is located and the position of the node, and the only output variable is the average deformation of all nodes affected by gravity under the current fixture layout.The TSM used in this case consists of 4 encoder blocks, 16 heads, and 80 channels and is trained on a laptop with Intel Core-i7-11800H @ 2.30GHz processor, and 32GB of RAM.In addition, to obtain more accurate results, the learning rate of the TSM is adjusted dynamically: at the beginning, with a large learning rate (0.001), after training 40 epochs, we change the learning rate to 1% (0.00001), and the total training epochs are 100.This design achieves good results in the training data set, improves the learning speed, and increases search efficiency and prediction accuracy.The batch size used for training is set as 20.Moreover, no setup errors are considered in our method and other methods [15,16,19].However, our work mainly focuses on how to more accurately predict the deformation of the entire compliant part for a given fixture layout.

Finite element analysis validation
In this subsection, TSM-TSS is used to calculate the total deformation of the compliant part with testing data.To evaluate the accuracy of the surrogate models and prove the effectiveness of our proposed method, two other surrogate models (BPNN and Kriging) are trained and validated with the same testing data.Two indicators (MAE and average output error) mentioned in Section 2.2.3 are used for comparison.Figure 6  In the Literature [29], authors took the prediction error of less than 0.09 mm as the measurement standard.As shown in Figure 6, the MAE between the accurate value and TSM-TSS is less than 0.09 mm, and better than the other two methods.In addition, the average output error of TSM-TSS is only 9.2%, while the error of the other two methods is larger than it.Notably, the average output error of TSM-TSS in the training data set is 9.9%, indicating that this surrogate model has great generalization ability.After the training, our method not only has a fast calculation speed but also ensures the accuracy of the results, which solves the problem that it is difficult to judge the current fixture layout quickly in advance.

Conclusions
This paper takes a single compliant part as the research object and proposes a novel transformer-based surrogate model with two-stage Latin hypercube sampling to calculate the part deviation under the current fixture layout.To get a high-precision prediction, a specialized TSS is designed and the TSM integrated position information and fixture deviation is built.Results show that the TSM-TSS can achieve 90.8% prediction accuracy and perform better than the other two surrogate models.In the process of placing fixtures, the fixture layout can be adjusted through the calculation of the model to avoid economic loss and accuracy error.Future research can be focused on more complex prediction objectives and more efficient surrogate models.

Figure 1 .
Figure 1.The framework of the proposed TSM-TSS method.

Figure 2 .
Figure 2. The basic transformer structure and the transformer structure in our method.
by taking the inverse of the abscissa distribution , as shown in Equation (3):

, 1 ,
… , in each region can be obtained.Obtaining the cumulative distribution value , 1, … , 1 by random sampling, boundary dividing points in the region can be obtained by taking the inverse of the ordinate distribution , as shown in Equation (

Figure 3 .
Figure 3.An overview of the main steps in TSS.

Figure 4 .
Figure 4.The geometry and FEM model of the compliant part.

7 Figure 5 .
Figure 5.The fixture layout and FEM simulation result of the compliant part in TSM-TSS.
(a) and Figure 6(b) show the MAE and average output errors between the deformation calculated by the three models and the accurate values given by the FEA.

Figure 6 .
Figure 6.Comparison of different surrogate models under various indices in the testing data set.