# Fiber Sensing in the 6G Era: Vision Transformers for \(\phi\)-OTDR-Based Road-Traffic Monitoring
## 3 Experimental Setup  
### \(\phi\)-OTDR Setup  
The field trial is based on a 1.3 km buried legacy fiber cable connecting the electrical engineering and physics departments. The cables are buried approximately 1 to 1.5 m beneath the sidewalk, displaced about 1 m away from the street, which helps to filter out background noise. The direct-detection-based \(\phi\)-OTDR setup is depicted in Figure 6. A pulse generator (81110A, Agilent, Santa Clara, CA, USA) producing 500 ns pulses with a 100 ms period is connected to a vector signal generator (RF, Agilent E4438C), feeding an acousto-optic modulator (AOM, NEOS FOAOM 26055-1-1.55, 55 MHz). The modulator takes as input a laser (Laser, Redfern Integrated Optics RIO0184-3-01-4-C9) with a small linewidth [36] operating at a 1551.72 nm wavelength and 5 dBm power. An isolator is used after the laser to prevent spurious reflections. The pulsed signal is then amplified by a two-stage erbium-doped fiber amplifier (EDFA, Padtec LOAC211 GAH), followed by a 0.1 nm band pass filter to decrease amplified spontaneous emission (ASE) noise. The amplified optical signal is launched into the fiber under test (FUT), preceded by a 3.7 km spool, via a circulator. The Rayleigh backscattering is collected by the circulator, amplified, and filtered again to decrease ASE noise. The filtered signal is sent to a photoreceiver (PD, Lasertron QDFB 005-103), followed by an oscilloscope (OSC, Agilent MSO9404A) and a Python-built DSP acquisition system. The traces are then processed to obtain images representing variations over time and distance. \(\phi\)-OTDR traces are concatenated into 5 min timestamped data. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Parameters** & **MAC (G)** & **RAM (MB)** \\ \hline MNet Car Count & 2,388,614 & 2.40 & 869.18 \\ ViT Car Count & 86,488,454 & 1.61 & 1647.69 \\ MNet Speed & 2,405,186 & 2.40 & 869.25 \\ ViT Speed & 86,498,882 & 1.61 & 1647.73 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Computational complexity of DL models. Figure 6: Experimental setup of \(\phi\)-OTDR-based DFOS. A narrow linewidth laser is pulsed by an AOM. The resulting signal is amplified by an EDFA, filtered, and launched into the optical fiber. The backscattering is collected by a circulator, amplified, filtered, photodetected, and recorded by the scope. RF: radiofrequency generator; AOM: acousto-optic modulator; EDFA: erbium-doped fiber amplifier; FUT: fiber under test; PD: photodetector; OSC: osciloscope; DSP: digital signal processing. Figure 7 presents examples of generated images, referred to as waterfall diagrams, over time and distance under various speed situations. The images are generated in a controlled environment by driving a heavy car on the monitored street. Automatic collection is implemented in Python. The scope is set up within a segmented collection configuration, so the collected traces are concatenated in a matrix \(A\) with elements \(a_{mn}\), where \(m\) represents time and \(n\) represents distance. Waterfall diagrams are generated in these arrays. Vehicle data appear as stripes formed by high-intensity pixels after the subtraction of consecutive lines in \(A\). For the 1.3 km fiber, 26,000 samples are collected for one pulse. Due to the 500 ns pulse width, the spatial resolution is 50 m. This limitation is imposed by the AOM rise time, which is approximately 250 ns. Although the 50 m spatial resolution poses challenges in differentiating closely spaced vehicles, for most applications, e.g., traffic flow monitoring and traffic interruption detection, detecting each vehicle independently is not the primary concern but the collective behavior of a set of vehicles in an observed time frame. The collection period is empirically chosen based on average vibration frequencies found in vehicular movements, which are around 5-10 Hz. Each collection represents 5 min, corresponding to 3000 traces with 26,000 points each, which are stacked in the form of a matrix.