# Simulation of Full Wavefield Data with Deep Learning Approach for Delamination Identification
## 5 Inverse Method for Damage Identification  
A global-best PSO algorithm implemented in Python was used in the optimisation process [35]. It takes a set of candidate solutions and tries to find the best solution using a position-velocity update method. It uses a star topology, where each particle is attracted to the best-performing particle. The algorithm follows two basic steps:  
* The position update: \[x_{i}(t+1)=x_{i}(t)+v_{i}(t+1),\] (4)
* The velocity update: \[v_{ij}(t+1)=w\,v_{ij}(t)+c_{1}\,r_{1j}(t)\,[y_{ij}(t)-x_{ij}(t)]+c_{2}\,r_{2j}(t )\,[\hat{y}_{j}(t)-x_{ij}(t)],\] (5)  
where \(r\) are random numbers, \(y_{ij}\) is the particle's best-known position, \(\hat{y}_{j}\) is the swarm's best known position, \(c_{1}\) is the cognitive parameter, \(c_{2}\) is the social parameterm and \(w\) is the inertia parameter, which controls the swarm's movement. Cognitive and social parameters control the particle's behaviour when given two choices: (i) to follow its personal best or (ii) to follow the swarm's global best position. Overall, this dictates if the swarm is explorative or exploitative in nature. In our tests, we used the following parameters: \(c_{1}=c_{2}=0.3\) and \(w=0.8\). Good convergence was achieved for these sets of parameters; thus, further parameter tuning was unnecessary.  
The following decision variables were used in the PSO:  
* The delamination coordinates \((x_{c},y_{c})\) with the bounds [0 mm, 500 m];
* A delamination elliptic shape represented by semimajor and semiminor axes \(a,b\) with the bounds [5 mm, 20 mm],
* A delamination rotation angle \(\alpha\) with the bounds [0\({}^{\circ}\), 180\({}^{\circ}\)].  
Based on the decision variables, binary images of \((256\times 256)\) pixels were generated (one image per particle--see Figure 1). In these images, ones (white pixels) represent delamination, whereas zeros (black pixels) represent healthy area.  
The most important component of the proposed inverse method is the surrogate DL model described in Section 4. The trained DL model was used for ultrafast full wavefield prediction, as illustrated in Figure 1. Ultrafast means an evaluation duration below 1 s, which compares to computation times using FEM-based methods from 30 min to 1 h. For a single particle and respective binary image, the DL model was evaluated seven times for 32 consecutive frames, thus giving as an output 224 frames. These predicted frames were compared to the'measured' frames by using the MSE metric, which was utilised in the objective function. However, for the sake of replicability of the results and the compatibility with the available dataset [31], we used synthetic data instead of measured data (acquired by the SLDV).  
For each PSO iteration, the particles were updated according to Equations (4) and (5). The termination criterion was assumed as 100 iterations, but it was observed that the objective function value converged much faster. In the final step, the best-matching wavefields indicate the coordinates, and the semimajor and semiminor axis and rotation angles of the elliptic-shaped delamination. These parameters were used for a visual representation of the best-matched delamination in the form of a binary image compared against the ground truth (see also Figure 1).  
As an evaluation metric for assessing the accuracy of the identified delamination, we used the intersection over union (IoU), which measures the degree to which the predicted delamination overlaps the true delamination. It is defined as follows:  
\[IoU=\frac{Intersection}{Union}=\frac{\hat{Y}\cap Y}{\hat{Y}\cup Y}, \tag{6}\]where \(\hat{Y}\) is the predicted output, and \(Y\) is the ground truth (true delamination) in the form of binary images.