# The Utilization of Artificial Neural Network Equalizer in Optical Camera Communications +
## 4 Experimental Setup  
The schematic block diagram of the proposed OCC system is shown in Figure 4a. A pseudorandom binary sequence (PRBS) with a length of 2 \({}^{16}\)-1 bits was generated using MATLAB, which was then up-sampled with \(n_{\text{samp}}\) of 50 and modulated using CP-PAM. Based on the output labels provided for 4-PAM, see Table 1, mapping of the data to the corresponding symbols was carried out. The PRBS \(s(t)\) was divided into sub-sequences with effective symbols per packet with lengths of \(P_{\text{bit}}\)-symbols, which depends on the transmitter bandwidth \(f_{\text{Tx}}\). Each subsequence was encoded with a pre- and post-amble to form a \(Q\)th Tx packet, where \(Q\)th represents the packet number and each packet consists of 3-symbol pre-amble [1.5 1.5 1.5], \(P_{\text{bit}}\)-symbol payload, and 3-symbol post-amble [1.5 1.5 1.5]. Figure 4: The CP 4-PAM OCC scheme: (**a**) System block diagram, and (**b**) photograph of the experimental setup. The symbols in the overhead signal (i.e., pre-amble and post-amble) were chosen to ensure constant average optical power when compared with the payload. The signal was then sequentially uploaded onto an arbitrary wave generator (AWG, AFG3252C, 240 MHz bandwidth), see Figure 3(b). The uploading process was done through the generation of Qth Tx packet at different \(f_{\text{Tx}}\), the output of which was used for intensity modulation of a Luxeon Rebel LED (SR-01-WC310) with a peak wavelength at 630 nm. Note, a linewidth of 118 nm was used for transmission of the modulated light over a short LoS free-space channel (i.e., 50 cm). At the Rx, a diffuser was used to scatter the light over the capturing area of the IS (Thorlabs DCC1645C RS) with a standard \(T_{\text{exp}}\) of 2 ms was adopted in this study. The observed frames \(\mathbf{P}_{U\times V\times 3}^{Q}\) at the output of the camera were processed off-line in MATLAB using both Algorithms 1 and 2. In Algorithm 1, the data set \(\mathbf{z}_{i}{}^{Q}\) was retrieved by accumulating the intensities for all pixels in each row. The received signal was then normalized to remove the DC by capturing 20 frames with no signal, see Figure 4(a),b. ```
Input: Qth Tx packets signals and (Qth x 10 RS) Captured frames \(\mathbf{P}_{U\times V\times 3}^{Q}\) at different \(f_{\text{Tx}}\) where \(Q=1,2,\,...,\,150\) and 20 frames of illumination gain (DC signal only) \(\mathbf{G}_{U\times V\times 3}\) Output:\(\mathbf{z}_{\text{cal}}^{Q}\) with that is fully synchronized with Tx packet
1 For each \(Q=1\) to \(150\)do
2  Read \(U\times V\times 3\) sized colour plain text frame \(\mathbf{P}_{U\times V\times 3}^{Q}=[[P^{Q}(i,j,c)]\). The RGB components of \(\mathbf{P}_{U\times V\times 3}^{Q}\) denoted as \(\mathbf{R}\mathbf{P}_{U\times V}^{Q}=RP^{Q}(i,j)\), \(\mathbf{G}\mathbf{P}_{U\times V}^{Q}=GP^{Q}(i,j)\), \(\mathbf{B}\mathbf{P}_{U\times V}^{Q}=BP^{Q}(i,j)\), respectively, \(i=1,2,\,...,\,U\) and \(j=1,2,\,...,\,V\) represents the pixels indices of captured frame, and \(c=1,2,\,3\). 3  Monochrome to grayscale frame conversion is applied by calibrating RGB components \(\mathbf{RP}_{U\times V}^{Q},\mathbf{GP}_{U\times V}^{Q}\), and \(\mathbf{B}\mathbf{P}_{U\times V}^{Q}\) together over \(c\), resulting \(\mathbf{PS}_{U\times V}^{Q}\). 4  Accumulate intensities for all pixels at each row \(\mathbf{z}=(\mathbf{z}_{i})_{i=1}^{v}\) where \(\mathbf{z}_{i}{}^{Q}=\sum_{j=1}^{v}\mathbf{PS}_{U\times V}^{Q}\). 5  Estimate the averaged DC value \(\bar{\mathbf{z}}_{DC}\) by repeating previous steps on \(\mathbf{G}_{U\times V\times 3}\).