# Deep Learning Based Inversion of Locally Anisotropic Weld Properties from Ultrasonic Array Data
## 2 Methods
### Forward Models  
To efficiently model waves propagating through the weld geometry, the weld region shown in Figure 1a is discretised over a regularly spaced \(2\times 2\) mm grid, and so there exists a total of 91 grid points within the weld, each of which is assigned a distinct grain orientation \(\theta(x,y)\). To estimate these grain orientations from ultrasonic time of flight (ToF) data, a model-driven deep learning approach is taken, where a large set of weld models \(\mathbf{m}_{\theta}\) and their corresponding ToF matrices \(\mathbf{T_{m}}\) are used to train a deep neural network. The forward problem of interest can be described as:  
\[f(\mathbf{m}_{\theta},\mathbf{c})=\mathbf{T_{m}}, \tag{2}\]  
where \(f\) is a mechanical wave modelling operator and \(\mathbf{c}\) describes the transducer array configuration. Note that later in this work, different wave modelling operators are used to generate the target travel time data (the DNN test data) and the training data so as to avoid the inverse crime [36]. To train the model based DNN to predict the weld structure from ultrasonic travel time data, an appropriate forward model is required to compute the ToF matrices \(\mathbf{T_{m}}\) arising from a given weld model \(\mathbf{m}_{\theta}\) (these form the training data pairs). As a large number of models is required, a fast and efficient model is desirable. The anisotropic multi-stencils fast marching Method (AMSFMM) [4] suits these requirements. The AMSFMM (denoted \(f_{\text{FMM}}\)) is a semi-analytical model of wave front propagation based on solving the Eikonal equation using an upwind finite difference scheme [37]. In this work, the locally anisotropic weld geometry is parametrised using 91 sub-regions, each of which is assigned a dominant crystal orientation (see Figure 2) which dictates the rotation of the associated velocity curve at that point in the domain. For the finite difference calculations of the AMSFMM, this geometry is further discretised over a regular square grid with 0.01 mm grid spacing. By introducing additional stencils along which finite difference calculations can be made, the wave can propagate in an increased range of directions and can thus account for variation in velocity given the incident wave angle (approximated by the angle of the finite difference stencil) and the underlying crystal orientation at any point in the domain [4]. The result is that the shortest travel time \(\tau(x,y;s_{i})\) to any given point in the domain \((x,y)\) from a known transmitter location \(s_{i}\) can be calculated, and in the case where we are examining a through-transmission data acquisition geometry (see Figure 3a,b, a time of flight matrix \(\mathbf{T_{m}}^{\text{FMM}}\) can be constructed by interpolating at the known receiver locations. An example travel time field \(\tau\) arising from the Ogilvy model shown in Figure 2a is shown in Figure 4. It must be noted that as the AMSFMM does not incorporate any reflections, an alternative approach is required to construct \(\mathbf{T_{m}}\) for the pulse-echo transducer array configuration. In this case, the ToF data between transmitting and receiving elements are calculated by the summation of the ToF estimations between the transmitter element to all points along the lower plate boundary (backward) and those between the receiving element and all points along the lower plate boundary. The output of this summation is an array of travel times corresponding to all the reflection points along the lower plate boundary, and the minimum value is taken to be the ToF for any pair of transmit-receive elements in the pulse-echo transducer array configuration.