## 3 Experimental Setup  
The proposed method was tested experimentally with a specific setup, as shown in Figure 3.  
This setup includes a stainless-steel pipeline with an outer diameter of 114.3 mm and a wall thickness of 6.02 mm designed to transport water or gas. It is equipped with AE sensors and a data acquisition system. The sensors are R15I-AST types from MISTRAS Group, Inc., and they are attached to the pipeline using mounting tapes and adhesive gels. The data acquisition system consists of an NI-9223 module from National Instruments, connected to a computer for recording pipeline condition data. To ensure the sensors were sensitive to applied stresses, the sampling frequency was set to 1 MHz, and pencil lead break tests were conducted. The flow diagram of the data acquisition system is shown in Figure 4.  
Figure 4: Flow diagram of data acquisition system.  
Figure 3: Experimental test setup for pipeline leak detection.  
Figure 2: Schematics of a basic LSTM architecture.  
In this study, the pipeline served as a medium for transporting both liquid and gas. To simulate a leak, a valve was fixed into the pipeline, and tests were conducted at pressure levels of 13 and 18 bar. The pressure was adjusted to 13 and 18 bar using a centrifugal pump for each medium. Figure 5 presents a view of the setup. A schematic depiction of the distance between the sensor and leak position is shown.  
Initially, with the valve closed, the pipeline transported gas at 13 bar pressure to collect normal operating condition data for 2 min. Then, the valve was opened to create a 1 mm leak, and data were collected for an additional 4 min. These data comprised Dataset 1. Afterward, the valve was closed again to stabilize the pipeline's flow.  
For Dataset 2, with the valve closed, the pipeline transported gas at 18 bar pressure to collect normal operating condition data for 2 min. Then, the valve was opened to create a 0.3 mm leak, and data were collected for an additional 4 min. The valve was kept open to create a 0.3 mm leak for safety reasons as the gas can be hazardous to health. These data formed Dataset 2.  
For Dataset 3, with the valve closed, the pipeline transported water at 13 bar pressure to collect normal operating condition data for 2 min. Then, the valve was opened to create a 1.0 mm leak, and data were collected for an additional 4 min. These data comprised Dataset 3.  
For Dataset 4, with the valve closed, the pipeline transported water at 18 bar pressure to collect normal operating condition data for 2 min. Then, the valve was opened to create a 0.5 mm leak, and data were collected for an additional 4 min. These data formed Dataset 4.  
A total of 360 signal samples were initially collected for each test, with 120 samples representing normal operation and 240 samples representing the leak condition. These samples were then used for further analysis and evaluation. A detailed description of each dataset is provided in Table 1.  
The proposed model was developed using Python 3.10 within the Visual Studio Code IDE, ensuring a streamlined coding experience with strong debugging capabilities. The environment setup ran on a Dell Vostro 3710 desktop with substantial specifications, facilitating efficient model training and data processing The system operates on Microsoft Windows 11 Pro, with a 12 th Gen Intel Core i7-12700 processor at 2.1 GHz which provides enough computational power for deep learning tasks. Memory resources include 32 GB of RAM and 512 GB of internal storage, offering sufficient space for handling large datasets.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Dataset** & **Fluid** & **Pressure** & **Leak Size (mm)** & **Total Samples** & **Normal/Leak** \\ \hline
1 & Gas & 13 Bar & 1.0 & 360 & 120/240 \\
2 & Gas & 18 Bar & 0.3 & 360 & 120/240 \\
3 & Water & 13 Bar & 1.0 & 360 & 120/240 \\
4 & Water & 18 Bar & 0.5 & 360 & 120/240 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Collected datasets used for training and testing the model.  
Figure 5: Schematic of the experimental setup.