# Application and Optimization of Algorithms for Pressure Wave Evaluation Based on Measurement Data
## 5 Results and Discussion  
The algorithms were applied to the 22 real events (cp. Table 1). The evaluation time frame in which the data were evaluated by an algorithm was determined by \(T1\) and \(T2\) in seconds. These were selected in the following ranges: \(T1\in\{-120,-100,\ \dots,-20\}s\) and \(T2\in\{20,\ 40,\dots,120\}s\). Each algorithm was applied to the 22 real events for each possible evaluation time frame \([T1,\ T2]\) to detect the PDTPs and localize the leakage of the event. The localization was performed with an established framework in the second evaluation step of Figure 3 described in [10]. In Figure 5, a heat map is presented for one exemplary algorithm (BCP) and the arbitrarily selected event 22. The heat map illustrates the evaluability of event 22 for the BCP algorithm. Both times, \(T1\) (rows) and \(T2\) (columns), were varied. For each evaluation time frame combination, the PDTPs were determined for the event, and the ranking for the affected EA was shown as the PC. Green values indicate higher PC values than red values. The maximum PC value of this event is dark green in a black dashed rectangle within the map. The optimal evaluation time frame for the BCP algorithm and event 22 was \([T1,\ T2]=[-40,\ 30]\). If multiple maximum PC values were available, the row sum and column sum were calculated. The evaluation time frame with the highest row sum and column sum for the maximum PC \begin{table}
\begin{tabular}{c l l} \hline \hline \# & **Algorithm** & **Development** \\ \hline
1 & Mean algorithm (MAN) & Self-developed \\
2 & Difference algorithm (DFN) & Self-developed \\
3 & Prediction algorithm (PDN) & Self-developed \\
4 & Linear algorithm (LNR) & Self-developed \\
5 & Moving linear regression algorithm (MLR) & Self-developed \\
6 & Change-point estimation by probabilistically pruned & Literature [26] \\  & objective (via Kolmogorov-Smirnov statistic) (KSS) & Literature [28] \\
7 & Kernel-based change-point detection algorithm (KCP) & Literature [28] \\
8 & Change-point detection in mean (CPD) & Literature [29] \\
9 & Bayesian single change-point (BCP) & Literature [31] \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Overview of the nine algorithms for determining the pressure drop time points. Figure 5: Heat map for the BCP algorithm for event 22 (green—max PC value, red—min PC value). Three PC values are highlighted: best (dashed black rectangle), worst (white rectangle), and the one for best overall evaluation time frame (black rectangle). value was selected to be the optimal evaluation time frame for this event. In contrast, the worst PC value is marked red in a white rectangle in the same way as in the case of multiple equal minimal values. Later, the best overall time frame for all the events was evaluated. In the case of the BCP algorithm, it was \([T1,\ T2]=[-100,\ 30]\). The corresponding PC value is highlighted by a black rectangle. Based on the heat maps (BCP algorithm for all events), Table 3 was created to show the optimal time frames and maximum PC values. In addition, the PC value for the latter determined the best overall time frame for all events, also shown for each single event. Using the BCP algorithm, evaluating each event resulted in many different optimal time frames and very high individual PC values. A total of 15 out of the 22 real events were evaluated by the BCP algorithm with a PC value of 100.0%. In these cases, the affected EA was ranked in the first place. With this algorithm, the worst PC value was 89.3% for event 17. For practical application, it was not possible to optimize the evaluation time frame, as the affected EA was not known. Moreover, an evaluation time frame must be selected prior to application. Later, the best overall time frame for all events for each algorithm was determined. For the BCP algorithm, the best overall time frame was \([T1,\ T2]=[-100,\ 30]\). The last column shows the PC value for each event when choosing this best overall time frame. The affected EA was ranked in the first place four times with a PC value of 100.0%.