Selective laser melting (SLM) is a complex and dynamic high-speed process that is influenced by a variety of factors, including mechanical conditions, material characteristics, laser scanning methods, and external environmental conditions [
17]. Among these factors, the most crucial ones are the process parameters, such as the laser power, scanning speed, scan spacing, and powder layer thickness. Additionally, SLM-formed parts have stringent performance requirements, including tensile strength, yield strength, density, stress distribution, and elemental composition. The stress and elemental distribution in SLM-formed components have a significant impact on their mechanical properties, reliability, and operational longevity [
18,
19]. However, due to the challenges in measuring stress and elemental distribution and the complexities of optimizing models based on these factors, this study employs indicators such as tensile strength, yield strength, density, and post-fracture elongation to predict the performance of the formed components.
2.1. Analytic Hierarchy Process Model for Process Optimization
Case-based reasoning (CBR) is a new method of solving problems based on databases in the field of artificial intelligence. It searches for similar questions in the past in the case’s base problems and solutions to solve new problems. It is of great significance to improve the accuracy of process recommendation results by considering the weight proportion of each demand feature and combining the weight with case-based reasoning. Based on this, a weighted case-based reasoning model combined with the analytic hierarchy process (AHP) is established for the rapid optimization and reuse of process schemes. The analytic hierarchy process is used to determine the feature weight.
Firstly, the decision problem is transformed into a three-level model consisting of the target layer, the criterion layer, and the scheme layer, serving as the basis for weight allocation. For different materials, case retrieval is conducted by classifying the cases based on the material type, with independent weight allocation within each material category. Taking GH4169 as an example, the target layer represents the total weight and the criterion layer includes the weights assigned to three factors influencing the selection of SLM process schemes: the forming part characteristics, processing costs, and mechanical properties. The scheme layer comprises specific case feature weights under these three factors, including the structural features, structural size, forming time, density, tensile strength, yield strength, and elongation at break. The established case feature hierarchy model is illustrated in
Figure 2.
Since criterion layer elements and scheme layer feature weights cannot be allocated across levels, judgment matrices need to be provided from top to bottom for the weight distribution, until all the case feature weights in the scheme layer are determined. The judgment matrices are constructed using a method on a scale from 1 to 9 to measure the relative importance of the indicators within each layer, as shown in
Table 1.
The form of the judgment matrix is Yk = (xij)n×n, where k is the index of the judgment matrix, xij represents the importance scale of the pairwise performance input by the user, and n is the order of the judgment matrix. The feature matrix is a positive reciprocal matrix, meaning that xij = 1/xij. Thus, the feature matrix only needs to be filled in the diagonal upper/lower part, with scales from 1 to 1/9 corresponding to 1 to 9. The horizontal and vertical coordinates of the feature importance ratio are inversely proportional.
According to the structure of the hierarchy model, there are three judgment matrices in this study: the criterion layer judgment matrix
Y1, the formed part feature judgment matrix
Y2, and the mechanical property judgment matrix
Y3. Among them,
Y2 contains only two features, and based on empirical knowledge, it is known that the importance of forming part structural features is nearly equal to that of the structural size for production. Therefore,
Y2’s internal scales are directly filled with 1. In the context of aerospace and military applications, based on the practical production experience of technical personnel from a certain military unit, the demand features selected in this model are ranked in order of importance: the mechanical properties of formed parts are greater than the features of formed parts, which are greater than the processing costs. Under the uncertainty of specific service conditions for SLM formed parts, the density, tensile strength, yield strength, and elongation after fracture are equally important. The forms of the three judgment matrices are shown in
Table 2,
Table 3, and
Table 4, respectively. After obtaining the judgment matrices, it is necessary to test their consistency to prevent significant discrepancies in the scales of the features within the same layer, which could lead to errors in the feature weights. The current approach commonly uses the consistency index (CI) to measure the degree of judgment matrix consistency, calculated as shown in Equation (1).
Here, λmax represents the maximum eigenvalue of the judgment matrix, and n is the order of the judgment matrix.
Table 2.
Criterion layer judgment matrix.
Table 2.
Criterion layer judgment matrix.
Y1 | Processing Cost | Formed Part Features | Mechanical Properties |
---|
Processing cost | 1 | 0.5 | 0.2 |
Formed part features | 2 | 1 | 0.25 |
Mechanical properties | 5 | 4 | 1 |
Table 3.
Formed part feature weight judgment matrix.
Table 3.
Formed part feature weight judgment matrix.
Y2 | Structure | Structure Size |
---|
Structure | 1 | 1 |
Structure size | 1 | 1 |
Table 4.
Mechanical performance weight judgment matrix.
Table 4.
Mechanical performance weight judgment matrix.
Y3 | Density | Tensile Strength | Yield Strength | Elongation after Break |
---|
Density | 1 | 1 | 1 | 1 |
Tensile strength | 1 | 1 | 1 | 1 |
Yield Strength | 1 | 1 | 1 | 1 |
Elongation after break | 1 | 1 | 1 | 1 |
A smaller consistency index indicates the better consistency of the judgment matrix. When the CI is zero, the judgment matrix is completely consistent. The average random consistency index (RI) is introduced as a reference control for matrix consistency. The RI for the orders one to ten of the positive reciprocal matrices, obtained from 1000 calculations, is shown in
Table 5. When the matrix order is less than three, the judgment matrix is considered to have perfect consistency; otherwise, the consistency of the judgment matrix needs to be evaluated by comparing the consistency index (CI) with the average random consistency index (RI). Therefore, the random consistency ratio (CR) is introduced as the final indicator of judgment matrix consistency, calculated as shown in Equation (2). When the CR is less than 0.1, it is considered that the judgment matrices provided by the user have acceptable consistency, and the feature vectors serve as the weights for each level. Otherwise, the user needs to rescale the importance of the case features until passing the consistency test. After the calculation, all three judgment matrices exhibit favorable consistencies. Otherwise, users need to rescale the importance of the case features until the consistency test is passed. Based on the importance scales in the judgment matrices, the ratio of current demand feature weights is calculated using the analytic hierarchy process as follows: the forming time to density to tensile strength to yield strength to elongation after fracture to structural feature to structural size = 0.116:0.171:0.171:0.171:0.171:0.100:0.100.
After calculating the weight size of the scheme layer, case retrieval and reuse are carried out based on the case library. The essence of case retrieval is to retrieve the most similar cases from the case library based on the similarity between new cases in demand and existing cases in the case library and use the solutions of similar cases as a solution to the demand. This article proposes a case retrieval method based on material classification based on the fact that there is almost no reference between different materials in the process. The main steps are as follows:
Step 1: Classify the cases in the case library by material grade. When inputting new demand cases, first search the case library by material grade and select cases of the same material to form an alternative case set;
Step 2: Based on the weighted nearest neighbor method [
21], calculate the similarity between the new case and the set of candidate cases. Essentially, after calculating the local similarity for each case feature, combined with the feature weights, summarize the weighted total similarity. The calculation formula is shown in Equation (3).
Among them, SIM(A,B) is the weighted total similarity between new case A and existing case B, sim(Ai, Bi) is the local similarity between new case A and existing case B in the ith case feature, w is the weight of the ith case feature determined by the analytic hierarchy process, and n is the total number of case features.
From the above formula, it can be seen that the local similarity of different case features has a direct impact on the weighted total similarity of cases. Therefore, using appropriate methods to calculate the local similarity is a key step in case retrieval. The case features involved in this article can be divided into two types of data: numerical and enumeration data types. It is difficult to calculate the local similarity between numerical and enumerated font features using a unified method. Therefore, this article adopts a hybrid local similarity calculation method, as shown below:
(1) For the characteristics of numerical cases, the calculation formula [
22] is shown in Equations (4) and (5).
Among them, the d (Ai,Bi) for the new case A with existing case B; the absolute distance between the case features is I; σi is the deflection point; and σ is a constant and its value ranges from 0 to 1. In this paper, it is 0.4. and , respectively, represent the maximum and minimum values of the ith numerical case features. Compared with the local similarity calculation method based on absolute distance alone, the proposed method can eliminate the influence of different feature dimensions to the greatest extent and make the recommendation results more accurate.
(2) For enumerated case features, in this paper, the structural features of single finger forming parts and the local similarity are given by technicians combined with production experience. This article shows that structure characteristics are limited to eight types: ordinary block type, complex sharp angle type, impeller structure type, interlayer runner type, irregular pipe type, honeycomb structure type, complex shell type, and lattice structure type. The local similarity matrix is shown in
Figure 3 and
Table 6. When calculating the local similarity of structural features, please refer to the table.
After the similarity calculation, the case base sorts all the cases according to the size of the similarity. At this time, it is necessary to conduct follow-up processing for the recommended cases according to the similarity threshold S and feature weight threshold . According to the experimental simulation results, the similarity threshold S of this model is 0.85, and the feature weight threshold is 0.15.
2.2. Weighted Particle Swarm Model for Optimization of Process Parameters
Since the case itself remains unchanged, when the performance parameters required by the target exceed the maximum reasoning range of the case base, the CBR model cannot be used for process recommendations. Therefore, this paper proposes a weighted particle swarm optimization model as a supplement to the weighted case-based reasoning model, which can flexibly optimize the process parameters according to the performance requirements of the target and output the optimized process plan.
Particle swarm optimization (PSO) is a meta-heuristic population optimization algorithm for searching the global optimal solution of a problem. It was proposed by two American scholars, James Kennedy and Russell Eberhart, in 1995. Compared with other heuristic search algorithms, such as a genetic algorithm, it has the advantages of being simple and easy to realize, having fewer super parameters, being easy to adjust, and having a fast search speed and strong search ability, etc. It has achieved good results in single-objective and multi-objective optimization in engineering [
25].
Based on the standard particle swarm optimization algorithm, this paper proposes a weighted particle swarm optimization model, as shown in
Figure 4.
The construction process of the weighted particle swarm model is as follows: firstly, the optimization objective and optimization parameters are determined, then the weighted multi-objective fitness function is constructed and the constraint conditions are determined, then the particle crossing processing strategy is determined, then the superparameters are determined, and finally the conditions are optimized.
(1) The optimization objective and optimization parameter determination. The optimization objective is the input of the model, and the optimization parameter is the output of the model. Therefore, the optimization objectives are density, tensile strength, yield strength, and the elongation at break, and the optimization process parameters are the laser power, scanning speed, scanning spacing, and powder layer thickness.
(2) The construction of weighted multi-objective fitness function and the determination of constraint conditions. Since the optimization objective is multiple performance parameters, based on the established optimal performance prediction model, this paper adopts the weighted summation method to construct the fitness function, and the weight factor is the characteristic weight determined according to target. At this time, the combination of optimization process parameters is the particle position (four-dimensional coordinates), and the output value of the weighted multi-objective fitness function is the particle fitness. To eliminate the dimension influence of different process parameters, performance indicators, process parameters, the performance index of the model involving all normalized processing, and the fitness function
F(
x) expression are as shown in Equation (6).
x is the particle coordinates’ vector, containing (x1, x2, x3, x4), indicating the laser power, scanning speed, scanning space, and spread powder process parameters with a thick layer of normalized values; D(x), σb(x), σs(x), A(x) are the density, tensile strength, yield strength, and break elongation of the normalized prediction model; k1, k2, k3, k4 are the four performance indicators according to the target to determine the weight initialization (when using the analytic hierarchy process (AHP) to determine the weight); and X is the particles in the search space constraints, namely the particle four-coordinate normalization process parameter value’s scope, which here are all [−1, 1].
(3) Determine the processing strategy of the particle crossing the boundary. The particle speed (v)’s scope is [−0.1, 0.1], when the speed cross-border v is the closest to the boundary value of the particle flying coordinate (xi)’s value in the range of [−1, 1] at the position of the cross-border to prevent particles trapped in the local optimum, with the coordinates xi calling back to 0.
(4) Determine the hyperparameters. The value range of learning factors
and
is set to 2. The number of population N is set to 1000, and the diversity of the population is increased to increase the global search ability. Because of the rapid convergence of the PSO, the maximum number of updates T only needs to be 100. The inertia factor
w(
t) is updated using linearly decreasing weights, making the global optimization strong at the beginning of the search and with strong local optimization when approaching global optimum, as shown in Equation (7) [
25].
Among them, when the wini for the initial inertia factor is 0.9, the wend inertial factor for the maximum update frequency is 0.4.
(5) End condition optimization. Usually the particle swarm optimization algorithm takes the maximum number of updates
T as the end condition, but it usually converges before reaching the maximum number
T. In order to accelerate the model optimization process, this paper proposes a heuristic end strategy combining targets: when the global optimal position of the particle swarm meets the target, the update iteration is considered as having found the optimal position, and the update iteration is ended in advance. The end condition of optimization can be expressed as follows:
where
t,
z,
l,
q, and
y are the density, tensile strength, yield strength, and elongation after break required.
The optimization objectives are densities of 100%, a tensile strength of 1100 MPa, a yield strength of 800 MPa, and a 30% elongation after break, and the optimization of the process parameters is carried out simultaneously with the standard particle swarm model using the weighted particle swarm model. Assuming a larger proportion of elongation after fracture, the ratio of each performance feature in the weighted PSO model is 0.168:0.168:0.168:0.496 calculated by the hierarchical analysis method, while each performance feature in the standard PSO model has an equal weight and is 0.25. As shown in
Figure 5, compared to the standard PSO, the WPSO model is able to perform a faster and more accurate recommendation for SLM process parameters.