# Experimental Characterization of RGB LED Transceiver in Low-Complexity LED-to-LED Link
## 3 Results and Analysis
### BER Improvement with Matched Filter
The signal-to-noise ratio (SNR) can be determined from the BER of the NRZ OOK modulation as follows [23]:  
\[BER\ =\ \frac{1}{2}erfc\left(\frac{1}{2\sqrt{2}}\sqrt{SNR}\right) \tag{7}\]  
The graph in Figure 6b also compares the SNR for the LED-to-LED communication link at different distances for data rates of 10, 50, 100 and 200 kbps. The maximum SNR achieved is 50 dB at the back-to-back configuration when transmitting at 10 kbps. It drops to 35 dB when the speed increases to 200 kbps. As expected, the SNR decays exponentially along the distance and at higher speeds. In the worst-case scenario, the SNR reaches 2.3 dB when transmitting at 200 kbps over a distance of 10 cm. The matched filter technique is a special type of maximum likelihood receivers which is known to maximize the signal to noise ratio of a received signal suffering from AWGN [7], such as in the RGB LED photodetector. The block diagram in Figure 8 demonstrates a typical digital communication system. In order to minimize the BER of the system, the SNR needs to be maximized by a filter at the comparator stage. At the input point of the threshold comparator block, the AWGN power \(N_{p}\) can be derived in terms of the its power spectral density \(PSD\), which is equal to \(N_{0}/2\) as follows [23]:  
\[N_{p}=\int\limits_{-\infty}^{\infty}PSD\,df\ =\ \frac{N_{0}}{2}\int\limits_{- \infty}^{\infty}\left|H(f)\right|^{2}df \tag{8}\]  
where \(H(f)\) is the transfer function of the filter. Figure 7: Images of the active areas of (**a**) single-colour (red) LED and (**b**) red sub-LED of RGB LED when seen under the microscope at the same scale. Similarly, the following Equation displays the power of the signal \(S_{p}\) at the input of the threshold comparator block:  
\[S_{p}=\big{|}y_{s}(T_{b})\big{|}^{2}=\ \Big{|}\int_{-\infty}^{\infty}S(f)H(f)e^{- \beta\pi fT_{b}}\Big{|}^{2} \tag{9}\]  
where \(y_{S}(T_{b})\) is the sampled filter output signal at \(T_{b}\). Dividing the signal power by the noise power to get the signal to noise ratio \(SNR\):  
\[Q\ =\ \frac{\left|\mu_{1}-\mu_{0}\right|}{\sigma_{1}+\sigma_{0}} \tag{5}\]0  
To minimize the SNR, Schwartz inequality is employed. It states that for any two conjugate functions \(f_{1}(t)\) and \(f_{2}(t)\):  
\[Q\ =\ \frac{\left|\mu_{1}-\mu_{0}\right|}{\sigma_{1}+\sigma_{0}} \tag{5}\]1  
Applying Schwartz inequality to the Equation (10) and considering \(f_{1}\) to be \(H(f)\) and \(f_{2}\) to be \(S(f)e^{-2\pi fT_{b}}\), the following Equation for the SNR is derived:  
\[Q\ =\ \frac{\left|\mu_{1}-\mu_{0}\right|}{\sigma_{1}+\sigma_{0}} \tag{5}\]2  
\[Q\ =\ \frac{\left|\mu_{1}-\mu_{0}\right|}{\sigma_{1}+\sigma_{0}} \tag{5}\]3  
where \(\int_{-\infty}^{\infty}\!\!\big{|}S(f)\big{|}^{2}df\) is the energy of the bit signal and can be therefore written as \(E_{s}\). Hence, the SNR is expressed as:  
\[Q\ =\ \frac{\left|\mu_{1}-\mu_{0}\right|}{\sigma_{1}+\sigma_{0}} \tag{5}\]4  
According to the Schwartz inequality, this only holds when  
\[Q\ =\ \frac{\left|\mu_{1}-\mu_{0}\right|}{\sigma_{1}+\sigma_{0}} \tag{5}\]5  
This means that the filter transfer function should have the exact shape and size of the logic '1' bit. In the case of the proposed experiment, this translates to a square-shaped signal of magnitude 4.5 V and duration \(T_{b}\). In case of a logic '1' bit being transmitted as \(s(t)\), the output of the matched filter is a triangle of base width \(2T_{b}\), with a peak at \(T_{b}\) of magnitude \(E_{s}\). Hence, the maximum output is achieved every \(T_{b}\), corresponding to the peak of the triangle. For the proposed system, a matched filter is designed to improve the BER at every speed and increases the error-free distance as depicted in Figure 9a. A 90% BER improvement is obtained at  
\[Q\ =\ \frac{\left|\mu_{1}-\mu_{0}\right|}{\sigma_{1}+\sigma_{0}} \tag{5}\]6 Block diagram of a digital communication system. 200  kbps when the distance is 5 cm. The most significant improvement of the matched filter technique is measured at the 200 kbps, with an improvement averaging 60% for all distances.