## Materials and Methods
### Bentchtop Transceiver Testing
#### 2.3.2 BER Measurement
For optical powers lower than \(2\) uW, the APD reverse bias was pushed as close to breakdown as safely possible to provide the sharpest electrical pulse rising edges. To determine the best PGA gain for the received pulse, the optical power was set to the desired power. Next, the PGA gain was increased from \(0\) dB until the pulse peak reached about \(30\) mV on the oscilloscope. Finally, the PGA gains were shifted with the goal of maximizing the separation between the maximum noise amplitude and the minimum pulse amplitude in fast frame measurements. This value was then taken to be the best PGA gain setting for the experiment. After the optical power and hardware settings were selected, the modulator was switched from sending pulses at a constant repetition rate to repeating a predetermined, pseudorandom data string. This repeated data string generated using the communication parameters in Table 4. Using the starting threshold as a baseline, the peak of the pulse is found by increasing the comparator threshold until the TDC-GPX2 began to have missing time stamps for pulses. The modulated data for three thresholds between the base and the peak of the pulse were measured. This testing was conducted for captured optical signals for peak powers of \(102\) nW and \(176\) nW. The time stamp measurements were sent from the TDC-GPX2 development board and stored on a computer to be analyzed. Figure 14: The oscilloscope reading is shown for the negative APD output signal. Two fast frame measurements are shown to visualize the difference between a non-modulated signal and a modulated signal. On the modulated fast frame capture, 2000 frames are shown within the single image and triggered off of a random pulse within the transmitted data. This shows the range of relative pulse positions for the data string. The experiment setup produces data in the form of time stamps, with a resolution of 1 ps and in bursts of 16 consecutive measurements. The majority of the time stamps were acquired by the time-to-digital converter but not recorded because of the limitations of the current TDC interface. The time stamps were encoded in two values, a phase relative to the TDC reference clock with a range of 100 ns called fine time, and a 12 bit clock period counter. Since the reference clock for the TDC oscillates at 10 MHz, the counter saturates and rolls over every 409.6 us. In order to reconstruct the data, obtain noise, and obtain the bit error statistics, the data exchanged on the optical link is a 8192-symbol random PPM string. The first step was to correlate a packet with the random string, and find the position of the packet relative to the string. This was done by minimizing the square of the error. For a packet of time stamps \(t_{\text{recorded}}\) indexed by \(i\), the position \(p\) is given by Equation (3):  
\[p=\underset{k\in\llbracket 1;8192\rrbracket}{\text{arg}\,\text{min}}\sum_{i} \left(t_{\text{recorded},i}-t_{\text{string}\,(i+k)\mod 8192}\right)^{2} \tag{3}\]  
Once the data encoded in the packets is known, the time interval between packets can be found. As time moves forward, the TDC clock period counter rolls over, and the string gets repeated, but with a different time period. The counter reaches its maximum every \(T_{\text{counter}}=409\),600 ns and the string period is \(T_{\text{string}}=524\),288 ns. Since the modulator and the TDC share the same clock, the periods for those two events are accurate to the sub-nanosecond level. To find the time interval between packets, Equation (4) is solved for \(n\) and \(m\).