# Co-Processing Parallel Computation for Distributed Optical Fiber Vibration Sensing
## 4 Experimental Results and Discussions
### FFT Analysis Processing
Then, the order of threads is marked as \(threadi=1,2,3,\ldots,Q\), and the total number of threads is represented as \(Q\). The FFT analysis process is shown in Figure 12. The data value of each time trace is needs to be sorted before processing by the butterfly arithmetic unit. Firstly, the natural sequence number of \(x(n)\) in Equation (5) is transformed and expressed in the binary form. Then, the corresponding binary number is flipped. Afterwards, these sequence numbers are converted to the decimal label. Therefore, \(x(n)\) is sorted and stored in the memory in the new numerical order. Figure 11: The data processing flow chart of time traces. FFT computation of \(M\) data points is achieved by using an \(R\)-level butterfly operation with \(R\) = log\({}_{2}M\); each level has an \(M\)/2 arithmetic unit to perform the butterfly operation at the same time. The current level number of butterfly computation is denoted as \(P\), \(P\) = 0, 1, 2,..., \(R-1\). From Figure 12, each butterfly computation is achieved by one thread, and \(M\)/2 threads are allocated to a time trace which contains \(M\) points. There are three kinds of exchange operations in the FFT process based on the principle of in-place computation, which are the address exchange, the operands exchange, and the results exchange after the butterfly operation. The zero-level butterfly computation only performed one exchange operation, which is the result exchange after a butterfly operation. When the value of \(P\) is not equal to zero, the obtained frequency values will replace previous frequency values. However, the \((R-1)\)-level butterfly computation only realizes two exchange operations, which are the address exchange and the operands exchange. DIT FFT has the characteristic of in-place computation. It means that the output data of the same butterfly arithmetic unit will replace the position of the input data in the memory space. In addition, every butterfly arithmetic unit of same level operates independently, which provides the theory basis for the multi-thread processor on the GPU. Every thread executes a butterfly arithmetic unit, but the processing data in the thread will refresh with the growing number of butterfly operator levels. Therefore, it can largely decrease computational complexity and the storage space of data. Essentially, applying DIT FFT on the GPU can speed up data processing. Eventually, the real-time performance of the \(\Phi\)-OTDR sensing system could be improved. In our experiment system, a single-point vibration test at a position of 1000 m is applied, while the total length of optical fiber is 2020 m. A two-points vibration test at the positions of 995 m and 1513 m are applied, while the total length of optical fiber is 2036 m. Each time trace contains 1024 points. All time-series curves are dealt with FFT processing with a frequency resolution of 7.80 Hz on the GPU, and the obtained frequency-space waterfall map is shown in Figure 13. From Figure 13a, the exerted external vibration is detected and located at a position of 1012 m, and the location error is 12 m. From Figure 13b, the vibration is exerted on two positions of 985 and 1505 m. The location errors are, thus, 10 and 8 m.  
Figure 12: The flow chart of fast Fourier transform (FFT) algorithm on GPU. Figure 14 illustrates the computing time contrast of FFT analysis processing on the CPU and GPU. The abscissae of Figure 14a,b represent the number of time curves, which positively correlate with the length of optical fiber. The ordinate means the computing time of the data analysis. From Figure 14a,b, when the length of optical fiber is changeless, with the growing number of points which needs to be executed for FFT analysis processing, the time increases gradually as well. When the number of points is constant, the time shows the trend linearly rising with the growing length of optical fiber.