Damaged hull coatings can exacerbate corrosion to the ship body and timely detection and repair of defects are necessary to prevent further corrosion. Due to the large size of the ship, detection of the defects is not easy, especially those located below the waterline. When the impressed current cathodic protection detection system is combined with specialized software, this problem can be solved. This article has developed a software system that can predict damaged locations. The system adopts an improved annealing particle swarm optimization algorithm, combined with electrochemical theory, which can search for defects through iteration. Simulation results show that the system can locate the defects accurately in situations, where there are only one or two damaged parts with high accuracy.

Ships may experience damage to the anticorrosion coatings due to aging or collision.1-2  Damage leads to increased local corrosion current and larger impressed current cathodic protection currents are needed to keep the vessel in a protective state. If the damaged part is located below the waterline, it is difficult to detect and by the time it is discovered, the ship may have already suffered severe corrosion. Therefore, timely detection of damage and prediction of its location is crucial for stopping the further development of corrosion.

Compared to the other aspects of ship hull anticorrosion research, a study in this area is relatively lacking.3-6  This lack is because the actual damage situation is relatively complex, including the defect shape, location, and count, therefore, various proposed algorithms have been simplified in various ways.

Thiel, et al.,3  adopted the neural network technology to predict damaged locations. This algorithm requires a large amount of potential and current data corresponding to randomly located defects to train the network, which results in a large computational load. Wrobel4  combined the genetic algorithm (GA) and boundary element method to predict the surface defects of the pipeline by the inverse problem- solving mode.

In the 1970s, Holland founded GA.7  GA expresses the solution of the problem (such as damage location xi, yi) in binary code and combines them to form a chromosome. Multiple chromosomes are generated by a certain algorithm to form a population, and then, by imitating biological evolution, the chromosomes in the population are crossed and mutated to generate new chromosomes. According to certain conditions (such as the minimum standard deviation of potential distribution), the good ones are left, and then the above process is repeated. After a certain generation of evolution, the optimal chromosome (the optimal solution of the problem) is output.

However, this algorithm requires operations such as chromosome selection, crossover, and mutation, making programming complex, and prone to falling into local minima.

To overcome the shortcomings of the above algorithms, an improved particle swarm optimization algorithm (imSAPSO) is proposed based on simple particle swarm optimization (PSO). This new efficient and fast algorithm closely adheres to practical applications as much as possible.

A simple PSO algorithm was proposed by Eberhart and Kennedy in 1995.8  It is an optimization technique to simulate the foraging behavior of birds. The algorithm takes the bird swarm as the modeling object, and each bird is regarded as a “particle.” Taking the damage location prediction as an example, each particle represents a possible damage location Xi = [xi, yi]. The swarm contains lots of particles, and all particles (Xi, i = 1, … ,N) constitute the solution space of the problem.

The optimization process is to let each particle Xi evolve according to the following rules
where pbesti is the historical optimal position and minimum current of particle i and gbest is the global one of the whole population; ω, c1, and c2 are constant. r1 and r2 are random numbers uniformly distributed in the interval [0,1]; vi(k), vi (k+1) are the velocities of the particle i in the k-th and k+1-th iteration step.

After several evolutions (k→iteration number), the optimal solution is obtained. See the Results and Discussion section for a more specific discussion.

The simple PSO algorithm has the same issue as the GA, it is easy to fall into the local optima after evolving several iterations. Therefore, this paper improves the PSO improve its accuracy. See the Results and Discussion section for details.

Figure 1(a) shows the three-dimensional (3D) drawing and dimensions of the ship hull. The four auxiliary anodes are identified by numbers 1, 2, 3, and 4. As the hull is symmetrical about the OY axis, half of the hull can be evaluated.

FIGURE 1.

Ship models (a) 3D geometric ship and dimension, (b) boundary conditions, (c) geometry discretization, and (d) defects on the hull.

FIGURE 1.

Ship models (a) 3D geometric ship and dimension, (b) boundary conditions, (c) geometry discretization, and (d) defects on the hull.

Close modal
Because the ship hull is immersed in seawater, the surface will be corroded, and the following electrochemical reactions will occur

To protect the hull from corrosion, the impressed current was injected into the hull surface through the auxiliary anodes to provide electrons to produce reaction (3) instead of reaction (2). A conductive circuit is established in the seawater around the hull, thus generating an electric field, because seawater is a strong electrolyte.

A domain Ω of appropriate size is divided around the hull, as shown in Figure 1(b). When the potential in the water body is in a steady state, its distribution meets Laplace equation
where ϕ is the electrolyte potential; x, y, z ∈ Ω.

As shown in Figure 1(b), the area Ω represents the hull surfaces. On these surfaces (interfaces), there are various boundary conditions.

2.3.1 |  Electrochemical Reaction Boundary Conditions

The electrochemical reaction shown in (2) and (3) occurs on boundary ①, and the current and potential relationship follow Tafel formula
where are the equilibrium potential, exchange current density and Tafel slope of iron and oxygen, respectively. See Table 1 for specific data. It should be noted that and should be corrected if the hull coating is damaged. The breakage rate is set fc = 0.14, therefore, the exchange current density should be corrected according to the following formula
See Table 1 for values of fc.
Table 1.

Electrochemical Parameters

Electrochemical Parameters
Electrochemical Parameters
Finally, the relationship between total current and potential is as follows

2.3.2 |  Current Boundary Condition

To prevent corrosion, current is injected into the hull surface through anodes 2 and 4 to generate cathodic polarization on the hull surface to replace reaction (2) and provide electrons for reaction (3). When the polarization potential reaches 800 mV (the reference electrode is Ag/AgCl/seawater), the surface will be protected. When the external power supply injects current into the electrode, the current will be injected into seawater through the contact surface. Therefore, the following relationship exists
where i_inject is the injected current and ρ is seawater conductivity.

2.3.3 |  Infinite Boundary Condition

The infinity boundary is not the infinity of spatial position, but refers to the place, where the electric field intensity is very weak and almost zero, as shown in surface ③ in Figure 1(b). Here, the surface current can be regarded as zero, that is
where n is the normal direction of the surface.

Theoretically, under these boundary conditions, the potential distribution in Ω can be obtained by solving Equation (4). However, due to the complexity of geometry and boundary conditions, it is difficult to obtain the analytical solution, so the numerical solution must be used. After discretization, the geometric modeling becomes the finite element model as shown in Figure 1(c), and is solved by COMSOL.

This section focuses on the improved particle swarm algorithm based on PSO. Because the PSO is prone to fall into local optima, researchers introduced an annealing mechanism into the particle swarm algorithm, which can help the solution avoid local optima and provide the opportunity to search for global optima denoted as “gbest.”

According to simulated annealing (SA) rules, pbesti is a worse solution than gbest, therefore, at annealing temperature T, the jump probability of pbesti relative to gbest is
where and fgbest are the fitness corresponding to the historical best solution of particle i (pbesti) and the globally optimal particle fitness (gbest), respectively. T continuously decreases during the iteration process according to a certain annealing regime, as detailed in the Determination of Initial Annealing section.
Obviously, the higher the quality of pbesti, the higher the replacement probability. If the jump probability pi is used as the adaptive value of particle i, the probability of replacing gbest with pbesti is
M is the population size.

In this way, after each particle evolves, its historical optimal solution replaces the global optimal solution with a certain probability Ri, which will jump out of the local optima.

Therefore, the velocity update formula after accepting the suboptimal solution is
where gbest′ is the global optimal solution after replacement.
The parameters of inertia weight ω and acceleration factor c1 and c2 have an important influence on the results. Increasing ω value can improve the global search ability of the algorithm, and otherwise enhance the local search ability. c1 and c2 represent the individual cognition and group cognition of particles, respectively, so when c1 is smaller and c2 is larger, the algorithm has a better local frequency search capability, and vice versa, the global search capability is better. After experiments in this study, the values of these parameters are as follows
where N_ite_max is the maximum number of iterations and k is the iteration step (k = 1,2, ... , N_ite_max).
Based on the above algorithm, this study improves the probability of i-th particle replacing the global optimal solution. At each step of the iteration, the historical optimal solution of each particle is not compared with the global optimal solution. Instead, after the iteration of all particles, the historical optimal solution (iopt) is selected, and then compared with the global optimal solution, and the global optimal solution is replaced according to the following probability
where is the fitness of particle iopt.

Such improvement protects the real global optimal solution to a certain extent. Table 2 shows the test results of the imSAPSO and other algorithms. It was found that the accuracy of this method is significantly improved over other algorithms.

Table 2.

Geometry Parameters

Geometry Parameters
Geometry Parameters

This paper is limited to where only one or two defects exist simultaneously. Take the latter as an example, let [X1, Y1] represent the first defect location and [X2, Y2] represent the second one, the data structure of a particle is as shown in Figure 2(a), where n1 and n2 are the number of the defects (see Figure 1[d]). Fuc is the fitness of the particle and then will be discussed in Definition of Particle Fitness section.

FIGURE 2.

Data structure of particle: (a) common particle, (b) historical best of a particle, and (c) global optimal particle.

FIGURE 2.

Data structure of particle: (a) common particle, (b) historical best of a particle, and (c) global optimal particle.

Close modal

Figure 2(b) is the historical best of a particle and its data structure is similar to Figure 2(a). Figure 2(c) is the data structure of the global optimal particle. The meaning of the elements in the structure is the same as above.

In the process of particle evolution, it is necessary to calculate the fitness of a particle, which is defined as follows
where Vbi and Vai are the node potential on the hull under the situations of predetermined defects and randomly selected defects and N is the number of the nodes.

Before prediction, two patches are selected as defects to be searched. With the breakage rate set to zero, the rest of the hull is set as 0.14, with Vbi calculated by COMSOL according to the boundary conditions (5) through (9).

At the beginning of the simulation, a certain number of particles with the data structure shown in Figure 2(a) are randomly generated. For any particle, (X1, Y1) and (X2, Y2) are random and it can be determined which two patches (X1, Y1) and (X2, Y2) are located in. Therefore, the number of the two small patches (n1, n2) are associated with (X1, Y1) and (X2, Y2). See the Lock Defect Location Through (X1, Y1) and (X2, Y2) section for more details.

During simulation, (X1, Y1) and (X2, Y2) vary continuously according to Equation (14), at the same time, the n1 and n2, which are associated with (X1, Y1) and (X2, Y2), are also changing. That is, the defects’ locations have changed. In this case, the hull potential should change as well. When the changed potential Vai is calculated, the fitness of a particle can be obtained.

The surface of the ship is meshed into many small patches as shown in Figure 1(d). If one or two of small planes are selected as the defect, determining the defect location is the key to simulation.

Taking (X1, Y1) as an example, in Figure 3, after model is discretized, each small patch contains many triangles, if (X1, Y1) is within any triangle, it can be concluded that (X1, Y1) is related to the number of the patch. The criterion of (X1, Y1) is within a triangle is if at the same time, the point P is inside the triangle; otherwise it is outside it. During simulation all triangles are evaluated, if one triangle meets the above criteria, the evaluation stops.

FIGURE 3.

Schematic diagram of a point within a triangle located within a small patch.

FIGURE 3.

Schematic diagram of a point within a triangle located within a small patch.

Close modal
When changing randomly, the coordinates are limited to a certain spatial range. Take X1 as an example, it is randomly generated as follows
where are the upper and lower limit of X1 as shown in Figure 4; r is a random number uniformly distributed in [0,1].
FIGURE 4.

Particle coordinate limitation.

FIGURE 4.

Particle coordinate limitation.

Close modal

The upper and lower limits [] of the particle in the X direction should be defined through interpolation calculation.

The coordinates of these black spots are measured and recorded as () and (). Let’s assume , the coordinate limits [] of X1 is obtained by
and , where n is the number of black spots.

Similarly, in the Y direction, A-B is the limit line.

SA is a theoretical global optimization algorithm proposed by Metropolis in 1953.9  It is an algorithm based on the principle of the solid annealing process. When the solid temperature is very high, the internal energy is large, and the irregular motion of particles inside the solid is fast. At this time, there is a certain probability that any solution of the entire solution domain can be obtained; as the temperature gradually decreases, the internal energy gradually decreases, and the particles inside the solid gradually tend to be ordered, that is, the solution in the algorithm tends to be stable. However, this stable solution may only be a local optimal solution, so as the solution gradually converges (cools down), the SA will have a certain probability of jumping out of this local optimal solution, that is, when the solid internal energy increases and the solution obtained is far from the objective function, the algorithm will accept it with a certain probability, rather than blindly rejecting it. This is also the core idea of the simulated annealing algorithm.

The initial annealing temperature Tmax affects the performance of the SA, therefore, to improve algorithm performance, Tmax was set according to
Among them, fmax and fmin represent the maximum and minimum values of the fitness of the particles generated initially; α is the annealing rule, which means that during the iteration process, the annealing temperature continuously decreases according to (22)

The recommended range for α is (0.9, 0.99), while in this study, α is set to 0.96. k is the iteration steps.

This calculation adopts the online technique of MATLAB and COMSOL, that is to establish communication between MATLAB and COMSOL, and run COMSOL through the script in MATLAB to greatly improve the flexibility of finite element simulation. The script command flow in MATLAB is shown in Figure 5.

FIGURE 5.

Calculation flowchart.

FIGURE 5.

Calculation flowchart.

Close modal

The entire algorithm process is very complex, with numerous control parameters listed in flowchart shown in Figure 5. For parameter information, refer to Tables 2 and 3.

Table 3.

Control parameters in the iteration for imSAPSO and GA

Control parameters in the iteration for imSAPSO and GA
Control parameters in the iteration for imSAPSO and GA

To test the performance of the software, 10 sets of tests were taken for the two cases: only one defect and two defects existed.

Figure 6(a) shows the variation of the objective function (take group 1 as an example in Table 4) with the number of iterations. It can be seen that error rapidly declines, and defects were found within about 13 iterative steps. Comparing the results calculated by imSAPSO and GA, respectively, in Figure 6(b) and Table 4, it can be seen that the object functions of imSAPSO are all smaller than that of GA, indicating higher accuracy. Examples of this accuracy difference can be seen in Table 4 for groups 6 to 10 that have defects with small planes (or are located in the edge zone) numbered 12, 39, 41, 45, and 61, respectively. Examination of Table 4 shows that imSAPSO correctly predicts defect location for all groups while GA incorrectly predicts defect location for the abovementioned groups 6 to 10.

FIGURE 6.

Error distribution (a) The variation of error with the number of iterations and (b) comparison of errors.

FIGURE 6.

Error distribution (a) The variation of error with the number of iterations and (b) comparison of errors.

Close modal
Table 4.

Research Results in Situation of Only One Defect

Research Results in Situation of Only One Defect
Research Results in Situation of Only One Defect

In the case with two defects as shown in Table 5, the imSAPSO algorithm converges on the correct defect locations for all groups. In comparison, the GA algorithm does not provide the same level of accuracy or convergence results. Only groups 1, 3, 4, and 9 obtained accurate results, but with significant error. The results of groups 2, 6, 7, and 8 are completely incorrect, while the results of groups 5 and 10 are partially correct, one of two defect locations predicted correctly.

Table 5.

Research Results in Situation of Two Defects

Research Results in Situation of Two Defects
Research Results in Situation of Two Defects

In Table 5, from the sixth group to the tenth group, the difficulty was increased, where some defect planes with small areas and remote locations were introduced. This increased the difficulty of searching. By increasing the number of particles and iterations, accurate results were obtained through convergence.

In addition, the sensitivity of the calculated results is related to the number of elements. Table 6 shows that when the number of elements is less than or equal to 70,179, the defect prediction is correct but the error is significant (10−3); but when the number of elements exceeds 87,131, the results are accurate and the error is significantly reduced (10−30). Taking into account the accuracy and efficiency of the calculation, it is appropriate to set the minimum number of elements to 87,131.

Table 6.

Study of Mesh Sensitivity

Study of Mesh Sensitivity
Study of Mesh Sensitivity

  • The algorithm (imSAPSO) proposed here is efficient and accurate. Its convergence steps, the accuracy of the objective function, and the final result were all improvements over GA.

  • For defects with small elements or on the edges of the geometry, imSAPSO correctly predicted all defect locations while GA only predicted the correct locations for some of the cases.

  • These results were for situations of one defect and two defects. For future studies, there is no fundamental difference in algorithms for three or more defects.

Trade name.

The authors thank the staff of the laboratory of the Metal Research Institute.

There are no potential conflicts of interest between authors.

The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request.

There are no additional materials.

There are no experiments involving human tissue.

LIU Bin is responsible for programming, debugging, and writing papers.

LIU Yingwei is responsible for calculating and analyzing the results.

1.
Park
I.-C.
,
Kim
S.-J.
,
J. Kor. Inst. Surf. Eng.
49
,
1
(
2016
):
p
.
32
39
.
2.
Lee
H.I.
,
Han
M.S.
,
Baek
K.K.
,
Lee
C.H.
,
Shin
C.S.
,
Chung
M.K.
,
Corros. Sci. Technol.
7
,
5
(
2008
):
p
.
274
282
.
3.
Thiel
C.
,
Neumann
K.
,
Ludwar
F.
,
Rennings
A.
,
Doose
J.
,
Erni
D.
,
Ocean Eng.
192
(
2019
):
p
.
106560
.
4.
Wrobel
L.C.
,
Elements
28
(
2004
):
p
.
267
277
.
5.
Thiel
C.
,
Neumann
K.
,
Ludwar
F.
,
Rennings
A.
,
Doose
J.
,
Erni
D.
,
Ocean Eng.
192
(
2019
):
p
.
106560
.
6.
Burczynski
T.
,
Beluch
W.
,
Eng. Anal. Bound. Elem.
25
(
2001
):
p
.
313
322
.
7.
Holland
J.H.
,
Adaptation in Natural and Artificial Systems
(
Ann Arbor, MI
:
The University of Michigan Press
,
1975
).
8.
Eberhart
R.
,
Kennedy
J.
, “
A New Optimizer Using Particle Swarm Theory
,”
Proceedings of the Sixth International Symposium on Micro Machine and Human Science
(
1995
).
9.
Kirkpatrick
S.
,
Gelatt
C.D.
,
Vecchi
M.P.
,
Inf. Sci.
179
,
13
(
2009
):
p
.
2232
2248
.

ϕ

Electrolyte potential

ϕFe

Equilibrium potential

Equilibrium potential

Exchange current density

Exchange current density

AFe

Tafel slope

Tafel slope

fc

Breakage rate rate breakage rate

i_inject

Injected current of anode

ρ

Seawater conductivity

n

Normal vector of hull surface

PSO

Particle swarm optimization

SAPSO

Simulated annealing PSO

ImSAPSO

Improved SAPSO

vi(k)

Velocity of particle i in k-th iteration

gbest

Global optimal particle

gbest′

Global optimal particle after replaced

pbesti

I-th particle’s historical optimization

fpbesti

Fitness of historical optimal of particle i

fgbest

Fitness of global optimal particle

Fitness of historical optimal particle among all particles

Ri

Replacing probability of particle i

Replacing probability of historical optimal particle among all particles

pi

Jump probability of particle i

c1

Individual consciousness of a particle

c2

Group consciousness of a particle

r1

Random value within [0,1]

r2

Random value within [0,1]

ω

Inertial coefficient

T

Annealing temperature

X1

Defect 1 coordinate

Y1

Defect 1 coordinate

X2

Defect 2 coordinate

Y2

Defect 2 coordinate

Minimum of X1 and X2

Maximum of X1 and X2

Yi

Interpolation node coordinate

Ya

Minimum of Yi

Yb

Maximum of Yi

Minimum interpolation node coordinate

Maximum interpolation node coordinate

fobj

The potential difference before and after damaging object function

Vib

Potential without damage

Via

Potential with damage

N

The number of hull nodes

Xi,opt

Historical optimal of particle i

Yi,opt

Historical optimal of particle i

ni,opt

Defect number of historical optimal of particle i

fucopt

Object function value of historical optimal of particle i

fucglobal

Object function value of global optimal particle

Xi,global

Global optimal particle

Yi,global

Global optimal particle

ni,global

Defect number of global optimal

n1

Defect number during iteration

n2

Defect number during iteration