## 5 Axial Piston Pump Simulation Test
### Comparative Analysis of Experimental Data
#### 5.2.2 Performance Comparison of Different Data Partitioning Methods  
As shown in Figure 14, it is challenging to determine the health status of an axial piston pump through a direct visual inspection of the time domain waveform of the pressure signal. To address this challenge, the DTW algorithm was deployed to segment the data and construct a dataset. To validate the effectiveness of the DTW algorithm for data partitioning, an additional dataset was generated using the same processing method as used in the fixed-length partitioning approach. Subsequently, the OCSVM algorithm was applied to perform anomaly detection on the datasets obtained using the two data-partitioning methods. The detection results are compared to ascertain the advantages of the DTW algorithm. Division of DTW Method  
A complete pulsation cycle segment was selected as the matching template, and the DTW algorithm was applied in the partitioning of the dataset according to the process outlined in Figure 4. The number of data points in each partitioned complete pulsation cycle signal varied. For ease of processing, the median length of all data segments (289) was selected as the standard sequence. Segments longer than 289 were truncated from the beginning, whereas segments shorter than 289 were padded from the end. Data partitioning was conducted on data collected under normal operating conditions, resulting in 164 samples. The training and testing datasets were split in a 3:1 ratio, yielding 123 and 41 samples for the training and testing sets, respectively. After completing data partitioning for the three abnormal operating states, 41 random samples were selected as the target abnormal samples. The partitioning results are listed in Table 1.  
Fixed Length Division  
Following the data-partitioning approach outlined in Table 1, the axial piston pump pressure signal dataset was divided into fixed-length segments of 289 for all four operating conditions. The aforementioned processing method was used to generate the dataset. Anomaly detection was performed on the datasets generated by the two aforementioned segmentation methods using the OCSVM algorithm. The results were evaluated using standard machine learning metrics, including the precision, recall, and F1 scores, as presented in Table 2. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Category** & **Sample Length** & **Number of Samples** & **Training Dataset** &
\begin{tabular}{c} **Testing** \\ **Dataset** \\ \end{tabular} & **Target Abnormal Samples** \\ \hline normal & 289 & 164 & 123 & 41 & - \\ swashplate wear & 289 & 165 & 0 & - & 41 \\ sliding shoe wear & 289 & 164 & 0 & - & 41 \\ single-plunger & 289 & 164 & 0 & - & 41 \\ loose shoe & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Axial piston pump pressure signal data set DTW partition. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Method** & \multicolumn{2}{c}{**Fixed-Length Division**} & \multicolumn{2}{c}{**DTW Division**} \\
**P** & **R** & **F1** & **P** & **R** & **F1** \\ \hline normal & 100.00 & 24.39 & 39.22 & 100.00 & 58.54 & 73.85 \\ swashplate wear & 56.94 & 100.00 & 72.57 & 70.69 & 100.00 & 82.83 \\ sliding shoe wear & 56.94 & 100.00 & 72.57 & 70.69 & 100.00 & 82.83 \\ single-plunger loose shoe & 56.94 & 100.00 & 72.57 & 70.69 & 100.00 & 82.83 \\ average & 67.71 & 81.10 & 64.98 & **78.02** & **89.64** & **80.59** \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance comparison of different data partitioning methods. The results indicate that when fixed-length data division was employed, the average precision for the four working conditions was 67.71%, with an average recall rate of 81.10% and an average F1 score of 64.98%. In contrast, using DTW for data division yielded average precision of 78.02%, average recall of 89.64%, and an average F1 score of 80.59% across the four working conditions. A close examination revealed that the F1 score exhibited an average increase of 15.61% when DTW was employed in the data division.