# Deep Machine Learning for Path Length Characterization Using Acoustic Diffraction
## 2 Materials and Methods
### System Design and Data Collection  
Data are generated by emitting continuous sound waves with controlled frequencies of 1 and 5 MHz through metallic specimens of varying heights each containing anomalies. The Hantek oscilloscope is used in combination with two sets of Yushi ultrasonic transducers. The Yushi 1 MHz ultrasonic Straight Beam Probe NDT transducers (S73224) have a beam waist of 12 mm, while the Yushi 5 MHz ultrasonic Straight Beam Probe flaw detector transducers (75,815) have a beam waist of 7 mm. The 1 MHz transducers have a beam waist of 12 mm and the 5 MHz transducers have a beam waist of 7 mm. Adding this variation in wavelength and beam waist allows an increased variability in the dataset which will lead to better generalizations of the data. The anomalies induced are holes with diameters of 6.47 mm and 2.17 mm; the rings can be viewed in Figure 1 and the dimensions of the rings and anomalies are specified in Table 1. In this experiment, the bottom transducer, the transmitter, is connected between the generator and channel 1 of the oscilloscope to capture the wave being sent into the medium. The top transducer, the receiver, is used to collect the wave on the opposite end of the medium. The experimental setup used to gather data for the models is shown in Figure 2.  
Figure 6: The profile of the transfer function phase data **(left)** and transfer function amplitude data **(right)**. One sample for each combination of anomaly size (D) and acoustic path length (PL) is presented. In each chart, the profiles corresponding to the same acoustic path length are plotted in the same color to help analyze for similarities which correlate to acoustic path length. The goal of the experiment is to determine if machine learning methodologies can find significant differences in the diffraction pattern caused by an acoustic anomaly which provide information on the acoustic path length of the anomaly. To control the sampling points, a steel observation plate is used. This plate has markings at each half-centimeter from the center of the plate to the edges of the specimen, covering roughly 6 cm in total. Several measurements are taken at each point, aligning the right edge of the receiver to each marking on the plate. Measurements are also taken halfway between each point, aligning the receiver's right edge at the center of two points. Measurements are always taken sliding from the left-most marking to the last marking on the right side of the plate, which provides data ordered from \(-1\) to 3 cm. Each set of movements from left to right accounts for a single trial. For each specimen, four trials are collected. The oscilloscope software stores each waveform, the transmitted and the received waveform, to the host computer as a CSV file containing the sampling rate and the wave voltage. Each pair of CSV files are then consolidated into a single CSV which contains a column for time steps, initial voltage, and received voltage. The transmitted signal is sampled at 17 lateral locations, each 0.25 cm apart. For 4 rounds of data collection, 5 signals are captured at each of the 17 locations. The 5 signals per location vary slightly in position at the location of interest to capture the variation in data collection, which would naturally occur between different operators. These 5 signals are combined at random to create 625 different lateral profiles for examination by the model. The data collected could have been combined to create 517 sets of waveforms; however, that is far more data than are needed to train this model. Training on such a large amount of data would likely lead to a lack of generalization as the patterns in the data are very similar. To avoid this, we limited the dataset generation to 625 combinations of the collected signals. Additionally, these profiles are saved in reverse, which simulates a slight shift of the specimen from left to right. In this way, 5000 signals per specimen are collected.