# A Novel Ranging Technique Based on Optical Camera Communications and Time Difference of Arrival
## 4 System Performance and Constraints
RS is a method of image capture used by CMOS cameras which does not expose the entire sensor simultaneously, but in a row basis. In Global Shutter (GS) systems, a usual technique found in CCD cameras, the whole sensor array integrates the incoming light simultaneously. RS technique activates the sensor array row by row from top to bottom of the picture (scanning across the scene rapidly), as shown in Figure 4. This difference produces predictable distortions of fast-moving objects (motion blur) or rapid flashes of light since the CMOS sensor top, and bottom parts capture different moments in time. This is a problem to be considered in image processing, but it is an advantage for OCC, since the scanning process allows capturing light changes with a higher time resolution than GS cameras (concretely sensor-height times greater). To obtain comparable results in both camera scanning types, the activation signal in RS devices needs to be faster than in GS. Therefore, considering a \(f_{frame}\) fps camera with a \(N_{y}\) rows sensor, a GS needs to activate its sensor \(f_{frame}\) times per second, while a RS element has to enable the rows for readout at a frequency of \(f_{frame}\cdot N_{y}\) rows\(\cdot\) s\({}^{-1}\). This can be seen from the communications point of view as a different sampling frequency or a distinct time resolution for GS and RS devices, respectively. In this way, RS present an \(N_{y}\) times higher sampling rate than GS. Therefore, it can detect greater bandwidth signals or shorter pulses. The other main difference is that the received signal is distributed among the rows in RS devices, i.e., each line in the sensor takes a sample of the signal, while, for GS, the full sensor takes the sample. On the other hand, the signal variation is visualized in different ways. GS shows variations of the illuminated area from one frame to other, whilst for RS, it is possible to appreciate partial illuminated areas instead of the whole light spot. It can be appreciated that the time duration is translated into space area, which is why the pulse duration \(T_{pulse}\) can be obtained from the illuminated area width. The portion of the illuminated area depends on the signal on-time duration, as Figure 5 shows. Short pulses excite a few rows, and wider pulses maintain the illumination for a greater  
Figure 4: Rolling Shutter vs. Gobal Shutter scanning methods. (a) rolling shutter; (b) global shutter. number of lines. Equation (2) calculates the number of illuminated rows \(n_{pulse}\) in the camera's image for a camera with a frame speed of \(f_{frame}\) fps and a \(N_{y}\) rows vertical size image sensor. \[n_{pulse}=f_{frame}\cdot N_{y}\cdot T_{pulse} \tag{2}\]  
When pulse duration covers all the camera's lines, the resulting signal corresponds to the system's maximum measured distance. For example, a 60 fps and \(3.264\times 2.448\) pixels (8 Mpixels) camera, such as that included in some smartphones, provides 2448 lines for an RS system. This corresponds to a sampling frequency of \(60\times 2448=146.88\) kHz or, in other words, a time resolution of \(1/146\),\(880=6.81\) us. As the system proposed here uses sound signals for distance measurement, and considering the speed of sound (\(343\) m/s), the theoretical minimum distance change detected by this technique is \(\Delta d=343\times 6.81e^{-6}=2.34\) mm. In the case of a GS system, due to the used scanning process, it is not possible to perform a similar distance estimation. In the same way, it is also possible to determine the maximum measured distance in RS, multiplying the number of lines of the image by \(\Delta d\). For the previous example, the maximum reachable distance is \(dmax=2.34e^{-3}\times 2448=5.73\) m. In Table 1, different video formats are presented determining the same parameters (sampling frequency, time resolution, \(dmin\), and \(dmax\)). As it can be appreciated from the example and Table 1, the proposed system provides enough resolution and range for a wide variety of applications relying on distance estimation.