# Co-Processing Parallel Computation for Distributed Optical Fiber Vibration Sensing
## 4 Experimental Results and Discussions
### Differential Accumulation Algorithm  
A differential accumulation algorithm is the conventional data processing method for a \(\Phi\)-OTDR sensing system in order to realize the vibration location. It can remove the background noise and improve the signal-to-noise ratio (SNR). The cooperative data processing of differential accumulation algorithms with FPGA, CPU, and GPU is shown in Figure 7. The collected data in the storage unit goes through data alignment by the FPGA, which adds the data header before each RBS data string, and is then sent to the host computer via the USB transmission bus. Figure 6: (**a**) The superposition of 100 Rayleigh backwards scattering (RBS) traces, (**b**) two-dimension time-distance RBS figure. Figure 7: Cooperative data processing with FPGA, GPU and CPU. The received data is stored as the \(N^{*}M\) matrix in the RAM of the host computer, which can be read and modified by the CPU. More concretely, the data matrix has \(M\) RBS curves, and there are \(N\) points in each RBS trace. Then, the data should be transmitted to the GPU via the Peripheral Component Interconnect-Express (PCI-E) bus. The differential accumulation processing of RBS traces is executed in the form of multiple threads in the GPU. For a differential accumulation algorithm, this only involves the simple calculation, multiplication and division, addition and subtraction functions. Therefore, this algorithm complexity is O(1). The algorithm with multiple threads is shown in equations as follows:  
\[diff_{thread,i}(n)=curve_{j+k}(n)-curve_{j}(n) \tag{3}\]  
\[avg(n)=\frac{1}{Q}\frac{1}{J-k}\sum_{thread=1}^{Q}\sum_{j=1}^{J-k}diff_{thread, i}(n) \tag{4}\]  
where the order number of curves is \(j=1,2,3,\ldots,J-k,J\) is the number of curves in a thread, and \(k\) is the curve number between two subtractive curves. Then the order number of points in one curve is \(n\) = 1, 2, 3, \(\ldots,N\), and the length of each RBS curve is \(N\). Then, the order number of threads is marked as \(thread=1,2,3,\ldots,Q\), and the total number of threads is represented as \(Q\). Therefore, \(Q\) multiplied by \(J\) is \(M\). Equation (3) means the subtraction of the RBS curves with an interval of \(k\) in one thread and the \(J-k\) curves could be thus obtained in one thread. Because of the function of parallel computing, each thread could execute the instruction of Equation (3) at the same time. In Equation (4), the differential data in one thread is accumulated and averaged, and each thread performs this operation in parallel. Therefore, each thread generates an average curve which contains \(N\) points, and \(Q\) curves can be obtained in total. Then, these \(Q\) curves are accumulated and averaged again in one thread to obtain a final vibration positioning curve, which can be sent to the display unit controlled by the CPU. Figure 8 demonstrates the positioning results of differential accumulation algorithm for 2000 RBS curves and the interval value of \(k\) in Equations (3) and (4) is chosen as five in this experiment. Figure 8a shows the single-point vibration positioning result. The external disturbance is located at 1012 m, with a positioning error of 12 m and SNR of 19.46 dB while the total length of optical fiber is 2020 m. Figure 8b shows the multi-point vibration positioning result. The real disturbances are placed at 995 m and 1513 m away from the head of sensing optical fiber. The positioning results show that the first vibration position is at 985 m with an error of 10 m and SNR of 19.88 dB, and the second vibration position is at 1505 m with an error of 8 m and SNR of 15.02 dB, while the total length of optical fiber is 2036 m. So, the vibration position can be precisely located and has a high SNR by implementing a differential accumulation algorithm with the parallel computing of the GPU. Figure 8: Position curves after differential accumulation algorithm for (**a**) the single-point vibration position and (**b**) the multi-point vibration positions.