# Effect of Temperature on Channel Compensation in Optical Camera Communication
## 5 Methodology
### Description of the Experiment  
The experiment was designed as a two-stage procedure. During the first part, the spectra of the LED under test were acquired, while during the second part, these data were used to obtain different communications metrics for OCC. As was commented, a script was developed in order to automate the spectrum acquisition procedure. Figure 4 depicts the flow diagram of the whole experiment. The LED was driven from 10 mA to 150 mA in steps of 10 mA. Before starting the spectrum acquisition, a waiting time of 3 min was applied to ensure temperature stabilization in the p-n junction.  
All the acquired spectra were energy-normalized to enable their use in the following estimation stages. This preprocessing step was needed because of the selected heating method based on the Joule effect. As temperature increased with the driving current, the total emitted power of the LED also increased. The response of a CMOS optical camera was estimated using the equations of Section 6 and the parameters of Table 1. Although the temperature effect of the CMOS image sensors is relevant and increases noise in cameras [39], it was not considered in this scheme because the cameras were assumed to be subject to normal temperature conditions. In addition, this experiment was focused on the temperature effect on the LED and not on evaluating thermal noise effects on the receiver side.  
Figure 4: Flow diagram of the experimental procedure.  
Figure 3: Diagram of the experimental setup.  
The channel matrices at different temperatures were formed by stacking the individual contributions of each LED on the three RGB bands plus the camera noise. Each row was then normalized respect to the matrix's diagonal term to avoid affecting the signal's energy during the compensation procedure. In this work, both Foveon and Bayer-based sensors were considered to compare the resulting performances. The effect of the input SNR level due to the noise signal introduced by the camera (Equation (5)) was also taken into account. This SNR level was estimated comparing the diagonal terms of the channel matrix respect to the corresponding noise power.  
Finally, the impact of compensating the channel using ZF and obsolete CSI on the SINR was evaluated. The SINR resulting from the ZF compensation of two matrices at different temperatures was obtained (Equation (10)). The SINR of each wavelength band was calculated as the ratio between the target band's power respect to the addition of the interfering bands' powers (Equation (10)). This assumes that all considered LEDs emit the same power, which is not unrealistic as the light sources were driven by the same currents, presented approximately 1 mW/mA efficiency, and had the same radiation pattern. Taking into account the random nature of the input, this calculation was repeated 10,000 times to provide an average estimation.  
\[SINR_{i}(\text{dB})\approx 20\log(\mathbf{I}_{H,ii})-10\log\left(\sum_{j\
eq i }\mathbf{I}_{H,ij}^{2}\right) \tag{10}\]  
Using this metric, it could be possible to estimate BER of an OOK-based OOC link according to Equation (11), where \(Q(\cdot)\) is the cumulative tail distribution of a standard normal (Q-function). This equation holds for both Global Shutter and Rolling Shutter schemes.  
\[BER=Q\Big{(}\sqrt{SINR}\Big{)} \tag{11}\]