## 3 Procedure for Estimation of Optimal Analysis Parameters
### Optimization of Analysis Parameters  
Given reference data such as the melt pool size obtained from analysis or experiments for the LPBF process, the optimal analysis parameters that can produce the closest thermal analysis result to the reference data can be estimated efficiently by optimization using a regression model. For optimization, the analysis parameters are used as design variables, and the mean square relative error between the output from the regression model (\(MP_{c}\)) and the reference data (\(MP_{M}\)) is set as an objective function, which is expressed as follows:  
\[\Delta MP=\frac{1}{N}\sum_{i=1}^{N}\biggl{(}\frac{MP_{Mi}-MP_{Ci}}{MP_{Mi}} \biggr{)}^{2} \tag{11}\]  
where \(N\) is the number of data points, \(MP_{Mi}\) is the reference value (e.g., the measured melt pool size) at the \(i\)th position, and \(MP_{Ci}\) is the output value (e.g., the calculated melt pool size) by the regression model at the \(i\)th position. The optimal analysis parameters that minimize the objective function are estimated by an optimization algorithm.  
Gradient descent, PSO, and Genetic algorithm are used as optimization algorithms to minimize the objective function, and differences due to optimization techniques are compared and verified. These optimization techniques are briefly described below.  
The gradient descent algorithm is a technique that moves in the direction of a low gradient, finds the minimum point of the function, and repeats it until the objective function value converges to a specific value [35]. This method may converge to a local minimum depending on the starting point and is expressed by the following Equation (12).  
\[x_{i+1}=x_{i}-\alpha\
abla f(x_{i}) \tag{12}\]  
where \(x_{i+1}\) is the value of parameter \(x\) at the \((i+1)\)th step, \(x_{i}\) is the value of parameter \(x\) at the \(i\)th step, \(\alpha\) is the learning rate, and \(\
abla f(x_{i})\) is the gradient of objective function \(f\) at \(x_{i}\).  
The PSO algorithm is a method based on the social behavior of the swarm. Each particle in the swarm moves through the search space, exchanging information with other particles, and moving in a direction set by inertia, cognitive force, and social force to find an optimal solution [36]. This method is expressed by the following Equation (13).  
\[v_{i}^{t+1}=wv_{i}^{t}+c_{1}r_{1}(x^{ind}-x_{i}^{t})+c_{2}r_{2}( x^{slo}-x_{i}^{t})\] \[x_{i}^{t+1}=x_{i}^{t}+v_{i}^{t+1} \tag{13}\]  
where \(v_{i}\) is the velocity of particle \(i\), \(x_{i}\) is the position of particle \(i\), \(x^{ind}\) is the position of particle \(i\) with the lowest objective function among the particles at the current stage, and \(x^{glo}\) is the optimal particle position with the lowest objective function during optimization. \(r_{1}\) and \(r_{2}\) are random numbers uniformly distributed in the range [0,1]. \(w\), \(c_{1}\), and \(c_{2}\) are the search parameter of the PSO, \(w\) is the weight, and \(c_{1}\) and \(c_{2}\) are the knowledge coefficient and social coefficient, respectively.  
The genetic algorithm imitates how genetic factors evolve to an optimal state as they pass generations using crossover and mutation. The global optimal solution can be found by repeating the initialization, selection, crossover, and mutation [36].