# Co-Processing Parallel Computation for Distributed Optical Fiber Vibration Sensing
## 4 Experimental Results and Discussions
### Differential Accumulation Algorithm
Furthermore, Figure 9 illustrates the time consumption comparison results for the differential accumulation processing of single-point vibration positioning between the GPU and CPU. The total number of RBS curves, which is denoted as \(M\), is chosen as 500 (marked in black), 1000 (marked in red), 1500 (marked in blue) and 2000 (marked in green) in the comparison analysis. Figure 9a shows the variation in time consumption of the differential accumulation calculations with the augmentation of the number of RBS curves in one thread on the GPU, when the differential accumulation is executed on the parallel computing platform. The \(X\)-axis represents the number of RBS curves in a thread (\(J\)), for a fixed number of all RBS curves (\(M\) = 500, 1000, 1500, 2000), the corresponding total number of threads (\(Q\)) could be also obtained by \(Q=M/J\). For example, in Figure 9a, when the number of all RBS curves (\(M\)) is 2000, for the \(X\)-axis value (\(J\)) of 100, the total number of threads (\(Q\)) is 20. It can be concluded that, when the value of \(J\) is less than 100 (which means that Q is more than 20), the time consumption is longer than 650 \(\upmu\)s. This phenomenon may be explained by thread synchronization in the operation process of the GPU. The smaller value of \(J\) means the greater number of threads, which will lead to frequent thread switching on the GPU. The process of thread switching will also consume time, thus slow down the calculation time of the threads. When the value of \(J\) is greater than 100 (which means that Q is less than 20), the variation in time consumption is specifically shown in the enlarged plot. The time consumption is largely reduced to less than 2 \(\upmu\)s. As the number of curves in one thread increases, the time consumption shows the trend of irregular fluctuation. It demonstrates that the time consumption of differential accumulation algorithm computed on the GPU may be limited by many factors, which are not only related to the number of RBS curves, but also may be influenced by the thread cache or the thread switch process. Moreover, the change in the GPU type may increase the number of threads, but the number of threads is not the only factor affecting the computing capabilities of the system. The computing capability of the \(\Phi\)-OTDR system depends not only on the number of allocated threads, but also on the amount of sensing data. Because of the thread cache allocation, or the thread switching process, in the GPU, these factors will also affect the computing capability of the system. Therefore, the algorithm complexity, the amount of sensing data and the number of threads all need to be considered for the system optimization. Figure 9b illustrates the variation in time consumption of the differential accumulation algorithm with serial computing based on the CPU. When the total number of RBS curves is fixed, a conclusion can be drawn--that the time gradually increases with the rising number of curves in a serial computing process. In addition, when the total number of RBS curves increases, the average time rises correspondingly, which is also marked by the short straight lines. Figure 9: The time consumption comparison results for the differential accumulation processing of single-point vibration positioning between the GPU and CPU: (**a**) the time spent on GPU (**b**) the time spent on CPU. By comparing Figure 9a with Figure 9b, when the total number of RBS curves is same, the processing time of parallel operations based on the GPU is far less than that of serial computations based on the CPU. For the differential accumulation algorithm, when the length of optical fiber is 2020 m and the number of processed curves is 2000, the time spent on the GPU is only 1.6 \(\upmu\)s. Under the same conditions, the CPU takes about 34 ms to realize data processing.