1. Introduction
Ship painting is one of the three pillars of modern shipbuilding and is used throughout ship construction [
1]. The design of the ship painting process mainly includes the selection of coating matching, the development of surface treatment level, the development of secondary descaling grade and the design of the process routine [
2]. A scientific and reasonable painting process is the key to ensure the quality of the ship’s construction. It is also an essential factor affecting the ship’s construction cycle and cost [
3,
4]. The design of the painting process requires an integrated consideration of many other factors, such as the corrosive environment in which the painting object is located, the available paintings and the available painting equipment. With the continuous development of technology, new coating matching have emerged and intelligent robots have been widely used in the field of ship construction [
5,
6]. At present, the design of the ship painting process mainly relies on the experience of technologists and no scientific process design flow and specification have been formed. Moreover, the amount of data in the painting process is huge, while the shipyard lacks effective management tools. Therefore, it is important to adopt the advanced concept and intelligent algorithm to realize accurate recommendations of the painting process for scientific management. This is also the way to promote the intelligent development of ship painting.
Painting, as an effective means of corrosion protection, is a key part of the product design and manufacturing process. Kern et al. developed a digital paint formulation design platform to improve the efficiency of paint formulation design [
7]. Oliveira et al. combined hierarchical analysis and preference ranking organization enrichment assessment methods to evaluate vehicle painting schedules [
8]. Bianco et al. provide a comprehensive life cycle inventory and life cycle assessment of the automotive painting process [
9]. With the spread of data intelligence and data-driven thinking, process design technologies based on intelligent algorithms are widely used in various industries [
10,
11,
12]. Li et al. reorganized the assembly plan based on the hierarchic subdivision and constructed a sequence of initial assembly using the ant colony algorithm [
13]. Nurwahaa et al. performed a multi-objective optimization of electrospinning process parameters, including polyvinyl alcohol solution concentration, applied voltage, spinning distance and volume flow rate by using the gene algorithm [
14]. Gao et al. constructed a mathematical model for manufacturing process planning. The process planning scheme with the lowest production cost is obtained by searching a limited space of feasible solutions with the intelligent water drop algorithm [
15]. Thao et al. developed a predictive model of welding process parameters by using the genetic algorithm to improve the robot welding performance [
16]. Jing et al. used the genetic algorithm to obtain the global optimal machining process route for parts [
17]. To sum up, scholars have achieved certain research results in the development of paint formulations and evaluation of painting technology routes. Meanwhile, the process design based on intelligent algorithms has been widely applied in many fields. However, in the field of ship construction, there are few reports about the intelligent design of the painting process.
As a huge crop of steel structures sailing in the ocean, various parts of the ship are in different corrosive environments. Therefore, the paintings used in different parts need to have different anti-corrosion performance requirements. The diversity of paintings determines the construction conditions, the construction process and the painting equipment [
2]. Therefore, a series of process routes, process methods need to be formulated. Furthermore, painting operations are carried out at different process stages. To improve the process design efficiency, the classification of large and redundant process data is a common method. Classification is an important form of data analysis. Common classification algorithms include decision tree, Bayes algorithm, association rule algorithm, neural network, support vector machine, random forest, etc. [
18,
19]. Among them, RF is a classification algorithm that uses a decision tree as a base learner. It has the advantages of high accuracy and is not easy to over-fit, so it is widely used to solve practical engineering problems [
20]. Chen et al. conducted a classified evaluation of the security risk of large-scale group activities based on RF [
21]. Han et al. used RF for intelligent diagnosis of rotating machinery [
22]. Miraki et al. mapped the groundwater potential based on the classification prediction results of RF [
23]. The above research results provide a good theoretical basis for the construction of the painting object classification model.
At present, the research of intelligent shipbuilding and intelligent shipyard is in the initial stage. In this paper, a painting process intelligent design algorithm is proposed to solve the problem of over-reliance on technologist’s experience for painting process design and the degree of intelligence is low in shipyards at the present stage. In order to obtain the best painting process, the painting objects are classified based on RF. However, supervised learning is not possible because painting objects do not have category labels. In this paper, the existing painting objects are firstly clustered and analyzed by IDBSCAN to realize the category classification of painting objects. In this paper, IDBSCAN based on GWO is proposed to solve the problem that the traditional DBSCAN is very sensitive to the initial clustering parameters. The adaptive determination of clustering parameters is realized to avoid the clustering bias caused by artificially set parameters. At the same time, a multi-objective evaluation function of the painting process is established with the single objective of painting quality, painting dosage and painting man-hour. In addition, the weight factors of each objective function are determined by using the analytical hierarchy process (AHP) and entropy method. The recommendation of the optimal painting process is achieved by the multi-objective evaluation of painting processes of similar objects.
2. Classification of Painting Objects Based on IDBSCAN-RF
2.1. Construction of RF-Based Classification Model for Painting Objects
In this paper, the classification model of painting objects is constructed by the trained RF. The object to be painted is classified into the most similar painting objects based on their characteristics. RF essentially belongs to ensemble learning, which is an important branch of machine learning. Ensemble learning efficiently fuses multiple base learners through strategies to obtain significantly better generalization performance than a single learner. The principle of RF is shown in
Figure 1 and the key steps are as follows.
Step 1: For each decision tree, N training samples with P attributes are sampled N times with put-back repetitions using the bootstrap sampling method to construct the sample M, where some of the data are never drawn after N times of sampling and do not become training samples, which are called out-of-bag data.
Step 2: The decision tree T is generated for the training set samples. Randomly select p attributes from the P attributes () as the set of splitting attributes for the current tree node. In addition, find the optimal way to split this node among these p attributes.
Step 3: Repeat Step 1 and Step 2 a total of n times to obtain the training set . The RF model is composed of the corresponding generated decision tree .
Step 4: The prediction results of the samples to be predicted are obtained based on the generated RF model. The final category of the target sample is obtained using majority voting based on the classification results of each tree.
Step 5: The generated RF model is applied to the validation set to obtain the decision result and the prediction result is obtained according to Step 4. The prediction results are compared with the validation set labels to evaluate the generalization ability of the model. Then, parameter tuning is performed to obtain the best RF model.
2.2. Clustering of Painting Objects Based on IDBSCAN
Since painting objects do not possess category labels, RF cannot be directly used for classification. Therefore, cluster analysis is first performed on the painting objects to form categories. Clustering algorithm, as a type of unsupervised learning, is the process of dividing the sample set into
k clusters based on the similarity between samples, so that the objects within the clusters have high similarity but are very dissimilar to the objects in other clusters [
24]. In this paper, an improved DBSCAN is used to construct the clustering model for painting objects.
2.2.1. DBSCAN
DBSCAN, a typical density-based clustering algorithm, is based on a “neighborhood” parameter (ε,
) to characterize the closeness of the sample distribution [
25,
26]. For a given data set
, the following concepts are available.
Definition 1 (ε-neighborhood). For , its ε-neighborhood contains samples in the sample set whose distance from is not greater than ε, that is Nε (xj) = {xi ∈ ℝ|dist(xi,xj) ≤ ε}.
Definition 2 (Core object). is a core object, if the ε-neighborhood of contains at least samples, that is .
Definition 3 (Directly density-reachable). is directly density-reachable from , if belongs to the ε-neighborhood of and is a core object.
Definition 4 (Density-reachable). is density-reachable from , if there is a sample sequence , where ,, and is directly density-reachable from .
Definition 5 (Density-connected). is density-connected to , if these exists that both and are density-reachable from .
DBSCAN defines a “cluster” as the largest set of density-connected samples derived from a density-reachable relation. If
is the core object, the set consisting of all samples is density-reachable from
is shown in Equation (1).
The clustering result obtained by DBSCAN is
. The average distance
between samples within its cluster is calculated by Equation (2) and the distance between its clusters
is calculated by Equation (3).
where
is used to calculate the distance between two samples.
where
represents the center point of cluster
C,
.
The advantage of DBSCAN is that arbitrarily shaped clusters can be discovered without specifying the number of clusters. However, DBSCAN is sensitive to clustering parameters and traditional DBSCAN relies entirely on empirical settings of and . In order to avoid the bias caused by artificially set parameters, GWO is introduced to improve DBSCAN to realize adaptive determination of parameters and improve the quality of clustering.
2.2.2. Grey Wolf Optimization
GWO is a swarm intelligence optimization algorithm inspired by the predatory behavior of grey wolf groups [
27]. GWO has the features of simple structure, few parameters to be adjusted, fast solving speed and convergence and is suitable for dealing with parametric optimization problems. The optimal solution in GWO is defined as
, the second and third optimal solutions are
and
, respectively and the remaining candidate solutions are
. The optimization process of GWO is the process of updating the position of
,
,
and
[
28]. The specific process is as follows.
- (1)
Encircling prey
When encircling the prey, the distance between the individual and the prey is calculated by Equation (4) and the position of the grey wolf is updated by Equation (5).
where
t is the number of current iterations,
and
are the coefficient vectors,
is the position vector of the prey and
is the position vector of the grey wolf.
and
are calculated as follows.
where
decreases linearly from 2 to 0 during the iteration,
and
are random numbers between [0, 1].
- (2)
Hunting
When the grey wolves identify the prey, the hunting process is guided by
to
and
. In GWO, it is assumed that
,
and
have a better understanding of the potential location of the prey. Based on the three optimal solutions that have been obtained, the location of the prey is determined and the remaining grey wolf individuals are forced to update their locations. The mathematical model of the hunting process is expressed as follows.
where
,
and
denote the distances between
,
,
and other individuals, respectively;
,
and
are coefficient vectors;
,
and
denote the current positions of
,
and
, respectively; and
is the current position of other grey wolves.
The formula for updating the position of the remaining wolves is as follows.
- (3)
Attacking prey (exploitation)
After the prey stops moving, the grey wolves complete the hunt by attacking the prey. When approaching the prey, the value of is gradually smaller and the fluctuation range of decreases. When , the wolves attack the prey, at which time the algorithm falls into local optimum.
- (4)
Search for prey (exploration)
The grey wolves search for prey based on the positions of , and . Grey wolves separate from each other to look for prey and then gather together to attack the prey. When , the grey wolves are forced to separate from their prey in order to find a more suitable prey, which means to find the global optimal solution.
2.2.3. Improved DBSCAN Based on GWO
In this paper, DBSCAN is improved based on GWO to obtain more accurate
ε and
and make the clustering results of painting objects more precise. The computational flow is shown in
Figure 2.
The steps are as follows.
Step 1: Set the number of wolf groups n and the maximum number of iterations . The neighborhood parameters ε and of DBSCAN are used as two-dimensional coordinates of individual wolf positions. ε and are randomly initialized to generate clustering results.
Step 2: The clustering indicator DB index is used as the fitness indicator of GWO and wolf classes (, , and ) are classified according to the fitness values. Fitness is calculated as .
Step 3: The wolves position are updated according to Equations (8)–(10). The fitness values of the updated individuals are calculated and the optimal fitness value for the current generation is recorded. If , the adaptation value of wolf is updated to and the corresponding position is recorded. If , is assigned to wolf and the corresponding position is updated to wolf . If , then and the corresponding position are updated to wolf .
Step 4: The final position parameters of wolf are optimal clustering parameters. The optimal ε and are obtained when the maximum number of iterations or the global optimum is reached. Then, they are used as the parameters of DBSCAN to obtain the clustering results of the painting objects.
2.2.4. Feature Selection
Feature selection is the process of selecting a subset of relevant features from a given set of features. Due to a large number of feature dimensions of the painting objects, feature selection needs to be performed to avoid dimensional disasters in the clustering process. Before feature selection, the features need to be pretreatment. For numerical features, the min-max normalization method is used to normalize all features to the [0, 1] interval, calculated as follows.
where
is the original value,
is the maximum value of the data set,
is the minimum value of the data set and
is the transformed value.
In this paper, the Laplacian Score method is used to extract the features of painting objects. The method reflects the local information retention ability of features by calculating the Laplace score of each feature [
29]. The concrete steps are as follows.
- (1)
Construct the nearest neighbor graph G
The nearest neighbor graph G contains a total of n nodes and the ith node corresponds to the feature sample . If sample is contained in the p-nearest neighbor of sample , or sample is contained in the p-nearest neighbor of sample , nodes i and j will be connected together in the nearest neighbor graph G. where p is a pre-given value.
- (2)
Construct the weight matrix S
- (3)
Generate Laplacian matrix L
where
D is the diagonal stiffness matrix,
.
- (4)
Calculate Laplace score
The Laplace score for each feature
is calculated as follows.
where
,
,
.
Feature score is inversely proportional to feature importance. The lower the feature score, the more influential the feature is. Therefore, after calculating the Laplace score of each feature, the d features with the lowest scores are the results of feature selection.
2.3. Overall Flow Based on IDBSCAN-RF
The classification method of painting objects based on IDBSCAN-RF is shown in
Figure 3. Firstly, in order to avoid the phenomenon of dimensional disaster in the clustering and classification process, feature selection is performed on the painting object to extract important features. Then, to solve the problem that painting objects cannot be directly classified without the category label, the painting objects are clustered based on IDBSCAN to get the categories of painting objects. After that, RF is trained based on the clustering results. Finally, classification of the objects to be painted is performed based on the trained classification model to find the most similar painting object categories, so as to obtain the similar painting object set.
4. Experimental Validation and Results Analysis
In this paper, the outer plate above the waterline of a shipyard H1127/7 type ship is used as the verification object for painting process design, as shown in
Figure 4. In the process of integrated hull-outfitting-painting shipbuilding, the segments are the initial stage of painting. In the segment painting stage, the outer plate above the waterline is split into segments for painting. The outer plate above the waterline is mainly corroded by the marine atmosphere, sea spray, rain and snow, seawater used for washing the deck and condensation water. To prevent corrosion, the corresponding coating matching for this part is shown in
Table 2 [
2]. At present, the painting equipment that can be used for the outer plate above the waterline in the shipyard mainly includes side suspension painting robots, rail painting robots, high-pressure airless sprayers, internal rail painting robots.
4.1. Feature Selection for the Painting Objects
The selection of the painting process equipment and the determination of the process parameters are directly influenced by various factors. These include the basic attributes of the object to be painted, such as material, area, descaling grade, surface roughness, etc., as well as the coating matching used for the part. Therefore, the basic attributes of the painting object and the selected coating matching are selected as the features of the painting object, as shown in
Table 3.
A total of 1200 painting history data from a shipyard between 2010 and 2020 are selected for feature selection of painting objects using the Laplace scoring method. The Laplacian scores of the 12 features are arranged in descending order and the results are shown in Equation (30).
In this paper, the five features with the lowest Laplacian scores are used as the result of feature selection for subsequent classification model construction.
4.2. Analysis of Clustering Results for Painting Objects
In this paper, the Davies–Bouldin index (DBI) and the Silhouette index (SI) are used to evaluate the clustering performance. DBI calculates the ratio of the sum of the internal distance of the cluster to the external distance. The smaller the DBI value, the higher the quality of clustering. DBI is calculated as follows.
SI measures the difference between the similarity between a sample
and samples within a cluster and the similarity of samples within other clusters. The value of SI is between −1 and 1. The compactness of the cluster to which
belongs is reflected by the value of SI. It is calculated as follows.
where
,
represents the average distance between sample
in the cluster and other objects in the cluster;
,
represents the minimum average distance of the sample
within a cluster from all other clusters.
For the evaluation of the performance of the proposed method (IDBSCAN), the results have been compared to those of the DBSCAN, OPTICS and PAPC-DBSCAN [
36,
37,
38]. Among them, in DBSCAN, set
,
; in OPTICS, set
,
,
; in PAPC-DBSCAN, set
,
,
,
,
; in IDBSCAN, set the number of wolves as 30 and the number of iterations as 300. The clustering results of different models are shown in
Table 4.
As can be seen from the table, the lowest DBI and SI are obtained by IDBSCAN, which verifies that IDBSCAN has better clustering performance.
4.3. Analysis of Classification Results for Painting Objects
The accurate classification of painting objects is achieved based on the results of cluster analysis. In order to obtain better classification performance, the parameters of RF are set and adjusted. To analyze the effect of the number of decision trees
on the classification results, set the maximum depth of decision tree
, the maximum number of features as 5, the minimum sample required for internal node re-division as 2, the minimum sample of leaf nodes as 1, the number of decision trees
. The results of the decision tree quantity optimization are shown in
Figure 4. As can be seen from the figure, there is a significant improvement in classification accuracy when the number of decision trees is increased from 10 to 40. The accuracy reaches the maximum when the number of decision trees is 70. In addition, when the number of decision trees increases, the accuracy rate fluctuates. However, the maximum error in accuracy is only 0.0024 when the number of decision trees is varied in the range [70, 200], indicating that the random forest algorithm has good robustness.
To analyze the effect of the maximum depth of decision tree
on the classification results, set the minimum sample required for internal node re-division as 2, the minimum sample of leaf nodes as 1, the number of decision trees
, the maximum depth of decision tree
. The results of the maximum depth of decision tree optimization are shown in
Figure 5. As can be seen from the figure, the classification accuracy varies significantly with the depth of the decision tree when
. After that, the variation of the accuracy rate gradually smoothed out. When
, the accuracy rate reaches the maximum. When the decision tree depth is varied in the range of [4, 10], the accuracy fluctuates in the range of 0.001, indicating that the algorithm has good robustness.
The finalized parameter is
,
. In this paper, the primer spraying process of the outer plate above the waterline is used as an example for process design Its corresponding characteristic values are shown in
Table 5.
The objects to be painted are classified based on the trained RF classification model. The set of similar painting objects for the outer plate above the waterline obtained is shown in
Table 6.
Cases of painting processes corresponding to similar painting objects are shown in
Table 7.
4.4. Multi-Objective Evaluation of Painting Processes
Field experts in ship painting are invited to compare the indicators of painting process evaluation. 1~9 scale method is used to construct the judgment matrix [
39]. The consistency test is performed on the judgment matrix according to Equations (20) and (21). The weights are calculated using Equation (22) and the results are shown in
Table 8.
The deviation degree
and the weight coefficient
of the entropy value for each index are calculated by Equations (24)–(28) and the results are shown in
Table 9.
The combination weights
calculated by Equation (29) are as follows.
The values of the single-objective evaluation function for the painting process in
Table 7 are calculated by Equations (15)–(17). On this basis, the value of the multi-objective evaluation function of the painting process is obtained by combining the combined weights of Equation (33) and weighted by Equation (18). The calculation results are shown in
Table 10.
4.5. Painting Experiment
Based on the results of the multi-objective evaluation, the highest scoring set of process parameters is selected and recommended to the painting process designer. The specific painting parameters are shown in
Table 11.
Based on the recommended results, the gun type, nozzle type, nozzle diameter and the number of nozzles are set for the side suspension painting robot. Moreover, painting process parameters such as paint spraying pressure and travelling speed are fed into the side suspension painting robot. The outer plate above the waterline is tested with primer paint, as shown in
Figure 6.
The dry film thickness gauge is used to measure the dry film thickness after the painting has completely dried. The painting area of the outer plate above the waterline is 183 m
2 and is divided into ten measurement areas. Within each area, the dry film thickness is measured at nine randomly selected points. The measurement results of dry film thickness are shown in
Figure 7 and the distribution of film thickness is shown in
Table 12.
As can be seen from the
Figure 8, the average film thickness is 219.19 µm and the maximum film thickness deviation is 77 µm. The rating film thickness of the primer for the outer plate above the waterline is 200 µm, as specified in the coating matching table for the H1127/7 type ship. According to the PSPC standard, the dry film thickness should satisfy the 90/10 principle [
40]. That is, the dry film thickness of more than 90% of the test points is not less than the specified film thickness and the dry film thickness of the remaining test points is not less than 90% of the specified film thickness. As can be seen from the table, 92.3% of the measurement points achieved the rating dry film thickness. Moreover, the dry film thickness of seven measurement points failed to reach the rating film thickness. However, the dry film thickness of these seven points also reached 90% of the rating film thickness, which is in accordance with the PSPC standard. Therefore, the dry film thickness of these seven points also meet the construction requirements of the shipyard.
5. Conclusions
In this paper, a painting process intelligent design method is introduced and verified by actual painting tests. To improve the efficiency of process design, RF is used to construct a classification model for painting objects. A hybrid classification algorithm of DBSCAN and RF is proposed to solve the problem that RF cannot be directly used to construct a classification model because painting objects do not have category labels. DBSCAN is used to perform clustering to form painting object category labels. Meanwhile, GWO is introduced to optimize DBSCAN for the adaptive determination of clustering parameters to improve the clustering quality. The evaluation function is established with the evaluation criteria of painting quality, painting dosage and painting man-hour by considering the dry film thickness, economic cost and painting efficiency. Furthermore, the weight coefficients of each objective function are determined based on the AHP and entropy method to realize the objective evaluation of the painting process in the painting object set. The primer painting process of the outer plate above the waterline is used as an example for process recommendation. In addition, the actual painting test is carried out according to the recommended process parameters. The results show that the average dry film obtained by painting based on the recommended process parameters is 219.19 µm. The dry film thickness qualification rate is 92.3%, which met the PSPC standard.
In the actual painting process of ships, the quality of the painting is affected by various factors. The final painting effect is affected by environmental factors such as temperature, humidity and wind speed. The actual painting operation cannot fully achieve the desired process design. Therefore, the establishment of an accurate painting quality prediction model and a dynamic adjustment strategy of process parameters based on real-time measurement of film thickness are important directions to be explored in the next step.