# Testbed for Experimental Characterization of Indoor Visible Light Communication Channels
## 3 Experimental Testbed
### Communication System
The previous sub-band SNR values \(\gamma_{n}\) are compared with switching levels obtained from BER vs. SNR plots to select the modulation mode (including 'no transmission', that is, \(b_{n}=0\)), which ensures that the instantaneous BER always remains below the specified target \(P_{e}\)[31]. Moreover, the eligible \(b_{n}\)'s are constrained to the set \(\mathbf{B}=\{0,1,\ldots,b_{\text{max}}\}\). With the proposed scheme lower-bound performance is achieved where each subcarrier fulfills the maximum BER requirement separately. However, a more ambitious scheme would be to accomplish a target BER on average. Thus, once the bits supported by each subcarrier are initialized, the subcarriers with modulation modes that can be increased without exceeding the system target BER are selected. The selection order is based on increasing the modulation mode of subcarriers that offers a relatively lower increase in the average error probability [31]. This process is repeated until the desired target BER is reached (but not exceeded) and is also completed when all the subcarriers convey the maximum allowed number of bits \(b_{\text{max}}\). In this work, we propose a timing synchronization scheme based on the method suggested by [PERSON] et al. [33]. According to [33], the timing sequence must have the following form:\[P_{\text{[PERSON]}}=\big{[}\mathbf{a}_{L/4}\,\mathbf{b}_{L/4}\,\,\mathbf{a}_{L/4}^{*} \,\,\mathbf{b}_{L/4}^{*}\big{]}, \tag{8}\]  
where \(\mathbf{a}_{L/4}\) represents a block of length \(L/4\) samples generated by the IFFT (\(L\)-point) of a pseudo noise (PN) sequence, \(\mathbf{b}_{L/4}\) is designed to be symmetric with \(\mathbf{a}_{L/4}\), and \(\mathbf{a}_{L/4}^{*}\) and \(\mathbf{b}_{L/4}^{*}\) representing the complex conjugates of \(\mathbf{a}_{L/4}\) and \(\mathbf{b}_{L/4}\), respectively. This symbol pattern can be easily obtained by generating a real-valued PN sequence on the even frequencies, while zeros are used on the odd subcarriers. This yields an IFFT output whose pattern coincides with that of Equation (8). We propose using the training periods to simultaneously perform timing synchronization and channel estimation [34]. However, obtaining [PERSON]'s timing sequence would imply to disable odd frequencies, which collides with the second functionality of channel estimation, the latter requiring transmission of training symbols on all subcarrier frequencies. Fortunately, a single \(2N_{S}\)-sample Shapiro-Rudin sequence is characterized by its second half being symmetric with its first half, thus presenting the form \([\mathbf{a}_{L/4}\,\,\mathbf{b}_{L/4}]\). Therefore, since this training sequence is real-valued, that is, \(\mathbf{a}_{L/4}^{*}=\mathbf{a}_{L/4}\) and \(\mathbf{b}_{L/4}^{*}=\mathbf{b}_{L/4}\), two of them can be combined and transmitted consecutively to obtain the pattern of Equation (8), now for \(L=4N_{S}\). Finally, as a cyclic prefix is placed before each OFDM symbol to combat ISI, \(N_{E}\) samples are inserted between each two consecutive OFDM symbols, so Park's timing metric has to be revised to adapt with this new scenario. Park's metric is given by:  
\[M(d)=\frac{|P(d)|^{2}}{\left(R(d)\right)^{2}}, \tag{9}\]  
where \(P(d)\) and \(R(d)\) are now redefined as follows:  
\[P(d)=r(d)^{2}+\sum_{k=1}^{2N}r(d-k-N_{E})\cdot r(d+k) \tag{10}\]  
\[R(d)=\sum_{k=0}^{2N}|r(d+k)|^{2}. \tag{11}\]  
Apart from the joint combination of timing and channel estimation, another inherent advantage of the proposed scheme is that the timing metric is based on \(4N_{S}+1\) instead of the \(2N_{S}+1\) samples as being evaluated by [PERSON]'s method, thus improving its robustness. Additionally, Shapiro-Rudin sequences are invariant, thus leading to a predictable performance as compared with variable performance of [PERSON]'s proposal based on PN sequences [34].