# Optical Camera Communication as an Enabling Technology for Microalgae Cultivation +
## 3 Communications Modelling
### Data Rate Analysis  
The maximum achievable data rate for a photobioreactor depends on its projection's vertical size over the image; in other words, the total number of vertical samples (rows of pixels) recovered from the signal [27]. Consequently, it is necessary to consider the scenario's geometrical configuration, the relative positions between the camera and the photobioreactors and their size. Equations (13) and (14) relate the projection dimensions (in meters) of a rectangular surface over the scene plane, \(H_{p}\), \(W_{p}\), with its corresponding pixels dimensions, \(h_{roi}\), \(w_{roi}\). Figure 4 shows all the geometry and camera parameters involved in a generalised scenario. \[h_{roi} =H_{p}\cdot\frac{h_{\text{res}}}{2\cdot\tan(\text{A}oV_{V}/2) \cdot\text{D}_{\text{FOV}}} (pixels) \tag{13}\] \[w_{roi} =W_{p}\cdot\frac{w_{\text{res}}}{2\cdot\tan(\text{A}oV_{H}/2) \cdot\text{D}_{\text{FOV}}} (pixels) \tag{14}\]  
where \(h_{res}\) and \(w_{res}\) are the pixel dimensions of the image, \(AoV_{h}\) and \(AoV_{w}\) the horizontal and vertical angle of view (AoV) of the camera (in degrees), respectively, and \(D_{FoV}\) the distance (in meters) from the camera lens to the scene plane. Following [PERSON]'s criterion (\(f_{\text{tx}}\leq f_{\text{3 dB}}/2\)), the minimum number of vertical samples of the signal required per symbol can be computed using Equation (15). \[h_{s}=\frac{f_{\text{s}}}{f_{\text{tx}}}\leq\frac{2}{f_{\text{3 dB}}\cdot t_{ \text{s}}}\quad(\text{samples}) \tag{15}\]  
It must be remarked that communication takes place in a windowed manner. Leaving aside the reflections with the objects present in the scene [13; 28], the signal has to be recovered mainly from the projection within the image of the light source where the signal quality is considerably better. Hence, during the acquisition, only a fraction of the total data sent is sampled by the sensor. While the sensor is not scanning the transmitter's surface, but another part of the scene, it will remain blind to the light changes of the transmission [19]. To overcome these blind periods, the data packets must be sent repeatedly (at least while the camera is acquiring two full frames). In addition, to avoid packet losses, the source's image projection, \(h_{p}\), must fit at least two complete packets, as was detailed in the previous work [29]. With these restrictions (Equation (17)), the overall transfer rate (in bauds) is obtained from Equation (16). \[R_{b} =S_{packet}\cdot\frac{\text{fps}}{2} \tag{16}\] \[h_{\text{packet}} \geq 2\cdot S_{\text{packet}}\cdot h_{s} \tag{17}\]  
where \(S_{\text{packet}}\) is the equivalent number of symbols per data packet. On the other hand, the projection's width in pixels (number of columns) also plays an important role in communications. Pixels located in the same row are exposed to light simultaneously, and they can be used to filter out noise, thus strengthening the signal-to-noise ratio. Moreover, wider areas aid source discovery and tracking and considerably ease the decoding routine. As a consequence, a minimum pixel width must be selected as a design requirement. Finally, it is worth mentioning that the proposed system's achievable capacity considerably exceeds the requirements for accurate monitoring of the culture parameters. To obtain a preliminary idea of these requirements, the following considerations are taken into account. The selected parameters to be measured are acidity, temperature, light conditions, carbon, nutrients, inhibitors presence and O\({}_{2}\) degassing. The packet's payload allocates twenty bytes per parameter, which is a much larger allocation than necessary. Furthermore, given that the culture's temporal evolution is considerably slow, samples of the culture can be taken reliably every 5 min, which offers a substantially acceptable temporal resolution. Based on these considerations, the required capacity is about four bits per second.