Design and Implementation of a Multi-Colour Visible Light Communication System Based on a Light-to-Frequency Receiver

Colour-shift keying (CSK) is a visible light communication (VLC) modulation scheme used in the existing IEEE 802.15.7 standard. In CSK, information is transmitted by changing the light intensities of the RGB LEDs. In this work, a low-complexity VLC system is proposed using CSK modulation and a novel receiver based on a light-to-frequency (LTF) converter. At the receiver, CSK symbols are interpreted and decoded in terms of frequencies, which are processed by a counter module of a generic microcontroller, thus avoiding the use of analog-to-digital converters (ADCs), which results in a low-cost VLC system. The main contributions of this work are summarized in the following key points: (1) A low-complexity receiver for CSK modulation is introduced; (2) A particle swarm optimization (PSO) algorithm for CSK constellation design is suggested considering the restrictions of the LTF based receiver; (3) Experimental and theoretical validation is perfomed for the proposed multi-colour VLC system. The results show that this system can provide a transmission speed of 100 kbps using a 4-CSK-LTF constellation for a symbol error rate (SER) of 10−4 and a signal to noise ratio (SNR) around 35 dB. These results suggest that the analysed system could find applications on those scenarios where low transmission speeds and ease of deployment are the goals.


Introduction
Increasing demand of capacity in communication systems is one the current main concerns in society since the world is now in the information age and data requires a communication system capable of transmitting signals around the world with low latency.Nowadays, wireless communication systems have permitted a fast growth and development of economy and have kept people continuously connected.However, wireless technology has saturated the RF spectrum, thus, transmitting signals using radio waves is unreliable these days because of the need for information encoding [1][2][3]; there is not so much RF spectrum available, and also, it is not safe in some restricted scenarios like airplanes, hospitals, and nuclear plants [4,5].Moreover, the scientific community is worried about the human exposure to high power RF signals [6].
One of the proposed solutions to overcome limitations of RF-based wireless systems is using visible light to transmit data.Such technology has been named visible light communication (VLC), and data signals are used to modulate the light intensity of LEDs (light emitting diodes) [7] and RGB laser diodes (LDs) [8].The LDs can provide Gigabit-class wireless connectivity in the order of 100 Gb/s, using modulation formats like quadrature amplitude modulation -orthogonal frequency division multiplexed (QAM-OFDM) and wavelength division multiplexing (WDM) [9][10][11].On the receiver, photodiodes detect the fast variations of the emitted light signals [12,13].The idea behind using visible light as a carrier for digital signals is mainly encouraged for the following reasons: (a) The infrastructure of LED luminaries can be reused as information transmitters.(b) It represents a low-cost communication system since LEDs are cheap components.(c) LEDs have low power consumption.(d) VLC offers no interference with RF systems.(e) VLC permits high data rate possibilities.(f) Visible light is not forbidden where RF radiation does.(g) These frequency bands for communications are totally free to use.(h) Light can not cross walls, thereby, transmitting information is highly secure [5,14,15] Among the existing modulation formats used on VLC systems, there is one characteristic called colour-shift-keying (CSK) which was proposed by standard IEEE 802.15.7 [16].CSK makes use of tristimulus light sources to create a sensation of a comfortable white light environment while the intensities of red, green and blue light on RGB LEDs (red-green-blue) are varied independently with the purpose of mapping symbols in the colour space [17].To do so, depending on the transmission speed desired, a proper digital-to-analog converter can be used to encode different states of amplitude.In order to detect CSK signals, typically, the receiver is equipped with three RGB filters, three systems to transform light intensity to voltage, and three analog-to-digital converters (ADCs).Additionally, pulse-position modulation (PPM) was adopted to synchronize the system.By using the aforementioned system, symbol sequences are estimated using a correlation between detected light and the propagation constellation matrix.This matrix compensates distortions of the signal while it is propagating on the wireless channel, and as a result of this process, symbols are recovered [16].In [18], a receiver capable of transforming light intensity into voltage using only one ADC and photodiode was proposed.On this approach, the color emitted by an RGB LED is overlapped over the photodiode and its respective responsivity vector is harnessed, therefore, system complexity was simplified.This work was evaluated by means of Monte Carlo simulation, and it was shown that the process to implement the receiver was decreased by 66% compared to the one described in the standard IEEE 802.15.7 [16].
Although CSK modulation is functional for high speed rates, in some scenarios with lower transmission speeds requirements, using an architecture based on ADC results in an oversized solution because they are more complex and expensive, and there are simpler solutions which are worth to implement.In this study, a simple and cost-effective VLC-CSK system with off-the-shelf components is proposed.
The contribution of this work can be listed as it follows: (1) It proposes the study, analysis, and evaluation of a low-complexity VLC system by using CSK and a Light-To-Frequency (LTF) converter as a receiver [19].(2) It proposes a particle swarm optimization (PSO) algorithm to design the M-CSK-LTF constellations that considers the euclidean distance between frequencies generated in the LTF and the restrictions of the transmitter and the receiver.(3) A mathematical analysis of the LTF-based VLC system where the equation to determine the symbol-error rate (SER) is estimated in terms of the euclidean distance between frequencies and the signal-to-noise ratio (SNR) and results are verified by applying the Monte Carlo method.(4) With an experiment, the M-CSK-LTF constellation designed with the PSO algorithm is validated.
Sections to come are organized as is indicated next.Section 2 presents the model of the CSK-based VLC channel.Section 3 describes the LTF-based VLC receptor.In Section 4 can be reviewed the details of the VLC-CSK-LTF prototype.The PSO algorithm to design the M-CSK-LTF constellations is introduced in Section 5.The estimated SER is discerned in Section 6. Results are presented in Section 7, followed by the conclusions.The IEEE 802.15.7 standard proposes a VLC system model using CSK modulation [16].The binary data that constitutes the input of the CSK modulator are coded by colour points called symbols S m for a constellation of a size M defined by the following alphabet:

Model of the VLC Channel with CSK
The range of colours or symbols S m established for constellation M-CSK depends on the colour triangle limited by the peak wavelength of the RGB LED, which is mapped in the colour space defined by standard CIE 1931 [17].Each colour point (x p , y p ) is represented by the vector of optical powers p = [P 1 , P 2 , P 3 ] T through the expression in Equation (2): where (x p,m , y p,m ) correspond to the colour coordinates of symbols S m .The ordered pairs (x r , y r ), (x g , y g ) y (x b , y b ) represent colour values (x, y) associated to the peak wavelength of the sources of red, green, and blue light, respectively.In addition, DAC modules were used to reproduce the vector of light powers in terms of the bias current of the RGB LED, where the signals of the DAC are applied to the electronic control circuit of the RGB LED [20].
The VLC receiver employs optical filters to separate the RGB components contributed by each transmitter LED.Subsequently, three photodiodes transform each component of the RGB into a photocurrent signal r i,m corrupted by Aditive White Gaussian Noise (AWGN) n (i) with zero variance and standard deviation σ 2 , as shown in Equation (3) [18]: Such photocurrent varies as a function of the incident optical power P i,m and responsiveness Rλ i associated with each photodiode i for each wavelength λ i .Besides, colour decoding comprises two subprocesses.The first step is compensating the photocurrent signals r i,m by using an optical gain matrix H [20] to estimate the vector of RGB powers P with Equation (4): where h j,k represents the relationship between the optical power transmitted by the light source k and the photocurrent generated by photodiodes j.The second subprocess is the transformation of the RGB power space P into a colour space ( xp,m , ȳp,m ) that corresponds to the colour coordinates for each symbol Sm estimated, which is obtained using Equation (5): This process enables to decode the binary data represented by each symbol Sm of the constellation M-CSK.

Low-Complexity VLC System Based on a Single Photodiode
Luna et al. [18] propose a block diagram of a CSK-based VLC system with low implementation complexity, compared to the system proposed by IEEE 802.15.7 standard [16].The receiving system is reduced to a simple photodiode and an ADC module.The photocurrent r m generated by the sensor translates into an overlapping of incident optical powers and the vector of photodiode responsiveness of each wavelength R λ , for symbols m = 1,2,...,M belonging to the constellation M-CSK.Such relation is shown in Equation ( 6) [18]: The colour decoding process is simplified to a system that detects the position of the received pulse and the associated energy [18] since the transmission makes use of pulse position-modulation (PPM) technique to estimate the activation sequence of the RGB light sources, so that each symbol in the M-CSK constellation is generated.

Proposed LTF-Based VLC Receiver
A block diagram of the CSK-LTF-based VLC system is shown in Figure 1.Unlike the receiver topology proposed by other authors [18], this new scheme employs the variation of the frequency associated with the square signal provided by the LTF, where a timer module is implemented to estimate the aforementioned frequency.This permits to change the ADC converters traditionally used in CSK schemes [16,18].The output signal of the LTF converter can be easily adapted and connected to a TTL microprocessor since it has an constant amplitude between 4 Volts and 5 Volts [21].The signal delivered by the LTF is a pulse train with a constant duty cycle of 50%, where frequency f m associated to such signal varies as a function of the electro-optical conversion gain R and irradiance E λ of the incident optical power.Additionally, f m is disturbed by the dark frequency f D , when light is not detected, as it is shown in Equation ( 7):

Channel Stimation Data
Thus, each symbol S m in constellation M-CSK is represented in terms of frequencies f m in the receiver, for m = 1, 2, 3, ..., M (hereafter called M-CSK-LTF).The dark frequency f D is generated by the LTF when irradiance is zero (E λ = 0) and it is also the result of leakage currents produced by the semiconductor material and affected by the temperature of the system [22].The optical conversion gain R is given in (Hz/(µW/cm 2 )) and irradiance E λ = P in Ar is generated by the incident optical power P in and the photosensitive area of the photodiode Ar [19,23,24].The irradiance units are given in µW/cm 2 .The M-CSK-LTF modulation process consists of a channel detector and a frequency estimator for each received symbol, which is shown in Equation ( 8): The first part of the process is completed by determining the mark frequency f mar , which should be equal or greater than the frequency used by the transmitter f trans .After aforementioned frequency is detected, the frequency associated to each transmitted symbol f s is measured as shown in Equation ( 9): The correspondence of each frequency f s estimated with the reference symbols of constellation M-CSK-LTF F = { f 1 , f 2 , ..., f M } is determined using the measurement of minimum euclidean distance d m , as shown in Equation ( 10):

VLC-CSK-LTF Prototype
Figure 2 presents the experimental VLC system based on CSK modulation and a LTF used to measure the symbol error rate of constellation M-CSK-LTF.The lighting levels of external sources were controlled to ensure a VLC system free of interferences.The transmitter and receiver were placed in the setup at the same height, 10 cm in between, as it can be observed in Figure 2a.Additionally, Figure 2b shows the electronic subsystems that comprise the M-CSK-LTF modulator and demodulator.Likewise, the transmitter receives the binary data and codes them by assigning colour points or symbols in the CIE-1931 space.The control system, the DAC and Linear Variable Current Driver (LVCD) modules are responsible for generating the driving current for the RGB LED in oder to reproduce the constellation points in the color space.The receiver consists of an LTF with a power dependant frequency function.Next, a timer is used to measure the output frequency so that symbols can be decoded.

Transmitter
The transmitter is composed of an Off-the-shelf microcontroller of the ATMEL family [25] to modulate the data, three 8-bit digital-to-analog converter (DAC) [26], three LVCD linear current regulators, and one RGB LED [27], as shown in Figure 3.The electrical scheme of the LVCD was taken from another work [20].For practical purposes, the proposed system uses operational amplifiers [28] and transistors [29] to control the current of the RGB LED.In order to reproduce the symbols in the transmitter, the control system [25] employs 8 lines identified as D0-D7 to establish the analog voltages in the ADC, with the recommended configuration provided in the data sheet [26].The output voltage depends on the reference signal V re f and the configuration of pins D0-D7, which can take a value in the 0-255 [26], Such relation is represented in Equation ( 11): The bias current for the RGB LED is determined by employing Equation ( 12) (expression could be applied for each red, green, and blue LED ) and following a similar analysis as it was done in [20]. :

Receiver
The receiver is composed of a TCS3200 LTF converter [30], a timer embedded in a microcontroller [25], and a program developed in MATLAB for offline signal processing.The LTF was configured to operate at the maximum output frequency scale and only the channel with no filter was activated [30] to detect incident light optical power.In [19], an example illustrating the response of the LTF to an incident optical signal generated by a white light LED was shown.In order to measure the frequency generated by the LTF, at least half a period in high state is necessary to calculate its approximate value using a timer (depending on the resolution of the timer).Nevertheless, a VLC communication system does not need to be highly accurate to carry out such measurement if a counting threshold is imposed to determine if a symbol is correct (this depends on the CSK constellation order, the more is the number of symbols, the less the permitted error margin).
The timer (Timer One) of the microcontroller [25] was employed to read the frequency of the signal delivered by the LTF using the library [31] in another work and the Algorithm 1.The signal of the LTF is processed by a leading signal edge detector that activates the timer with a period of 1 µs with the aim of estimating the duration of the positive semi-cycle of the output signal, and in consequence, the frequency using the expression f m = 1 2 * t one .The term t one is the time estimated with timer one.
Algorithm 1 Algorithm implemented in [25] to read the frequency employing a timer one Require: Square wave signal with variable frequency f m , importation of timer one library.Ensure: Estimated frequency f m .
1: Configure timer one library with a period of 1 µs.This work uses the technique of signal period measurement since the VLC system requires a fast measuring system due to quick changes in light signal levels [22,30].The period measurement technique requires a reference clock signal that greatly exceeds the frequency of the signal to be measured.In the case of the TCS3200 LTF, the output signal has a frequency ranging between 10 Hz and 780 kHz [30], which enables the use of low-cost embedded systems [25] since most of them are equipped with timer modules with reference clock signals in the order of MHz [32].

Optical Response of the RGB LED
The central wavelength associated with the RGB LED [27] was measured with the LR1 optical spectrometer manufactured by ASEQ Instruments [33], which incorporates a TCD1304DG Toshiba optical sensor with a spectral bandwidth from 200 nm to 1100 nm.This optical response of the RGB LED enables us to carry out an analysis from the colour standpoint, where the peak wavelengths mark the vertices of the colour triangle in the CIE 1931 space [17], as shown in Figure 4.The vertices of the colour triangle limit the area to select the symbols (colour points) of the M-CSK constellation, where colour coordinates (x, y) associated with the RGB LED are (x r = 0.7 y r = 0.3), (x g = 0.19 y g = 0.78), (x b = 0.09 y b = 0.13) [34].

Electro-Optical Linearization of the RGB LED
Figure 5 shows the plots of the radiated power against the bias current applied to the RGB LED.Each of the curves is compared to the ideal linear response of the system.The bias current was generated with EA-PS 3016-20B equipment [35] and the optical power emitted by each channel was measured with an S120C optical sensor connected to a THORLABS PM100D [36].
The linearization process of the curves was carried out by a third-order polynomial regression employing a function polyfit of MATLAB software and following the guidelines in [20].In Equation ( 13) such a process is represented, where the normalized optical powers for each channel are P r , P g and P b , and the bias currents I r , I g , I b for the RGB LED:  In Equation ( 14), we expressed a set of linear relations which represent the mapping conducted by the LTF converter that was completed by a first-order polynomial regression, which is similar to determining the slope of the straight lines in Figure 6.Equation ( 14) has the mathematical form f i = K i P i , where f i given in Hz represents the output frequency of the LTF, P i given in µW is the incident optical power on the photosensitive surface of the sensor and the numerical constants

Algorithm to Design M-CSK-LTF Constellations
The optimization algorithms proposed to design M-CSK constellations so far [20,37] have been based on Euclidean distances between colour points on the CIE 1931 colour space [17] in order to optimize its area and to design high-resolution M-CSK constellations [20].However, the design approach of traditional M-CSK constellations is not valid for CSK-based VLC systems that consider a single photodiode with no optical filter in the the receiver, because the optimization constraints related to the sensor should be considered [18].As a result, this section introduces, to the best of our knowledge, a new design approach for M-CSK-LTF constellations using the PSO algorithm and considering the restrictions of the transmitter, receiver and the Euclidean distances between the frequencies generated by the LTF.The main objective of PSO is to find the optimal set of colour points (x p , y p ) in the colour space in Figure 4.These points, when evaluated by the system, generate a set of frequencies in the LTF F m , which are at a minimum distance d min .Figure 7 outlines the general scheme of the M-CSK-LTF system.
The PSO algorithm [38,39] to design M-CSK-LTF constellations, is shown as a block diagram in Figure 8 and its operation is explained below: 1. Start: The user defines these system parameters: size M of constellation CSK; transmitter frequency ( f Tran ), which is transformed into reference frequency ( f re f erence ); minimum distance between frequencies (d min ); size N of the particles of the PSO and defition of the search space on the CIE 1931 colour space, which is represented by the central wavelength associated to each LED (red, green and blue).2. Establishing points (x p , y p ): The PSO randomly distributes the particles in the search space defined by CIE 1931 colour plane and establishes the vector of the colour points [x p y p ] to be evaluated.3. Restrictions for selecting points (x p , y p ): Each colour point is evaluated under restriction conditions that indicate if they are suitable to be transmitted via the VLC channel.First, for the symbol set S m grouped by each colour coordinate (x p , y p ), estimated by Equation ( 5), the sum of the normalized optical power vector should be equal to one P r + P g + P b = 1 [18].The last restriction should guarantee the bias current range {I r I g I b } that can be applied to each RGB LED [20], such that I min ≤ I r I g I b ≤ I max .These currents are determined by Equation (13).If the aforementioned restrictions are not satisfied, a value of zero is assigned to each colour point x p = 0 y p = 0. 4. Evaluating the LTF function and searching for the reference frequency: The optical powers generated by the RGB LED is emitted to the LTF surface to be represented in terms of frequency as specified in Equation ( 14), where the output signal of the LTF f m is composed by the contribution of each channel, as shown in Equation ( 15): The first iteration of the algorithm is aimed at finding the reference frequency f current = f re f erence and the colour point (x p , y p ) related to it.The remaining iterations are dedicated for looking frequencies f m , where the following restrictions are applied.The first one indicates that the range of frequencies generated by the LTF f LTF,j is limited by the transmitter frequency f Tran and the maximum frequency the LTF can generate f maxLTF , as shown in the inequality f Tran ≤ f LTF,j ≤ f LTFmax , where j = 1, 2, 3, ..., N. The last restriction ensures that the target f re f erence is in the tolerance margin f tolerance set by the user, which is the result of calculating the Euclidean distance between f LTF,j and f re f erence .This is summarized as follows: dis| f LTF,j − f re f erence | ≤ f tolerance .Finally, if the set of frequencies f LTF,j does not contain the target frequency f re f erence , the system starts a new exploration of colour points in the CIE-1931 space. 5. New exploration: The PSO algorithm randomly generates N colour points (x p , y p ) using the velocity Equation ( 16) and the j-th position (17) of each particle [38,39].where v n j is the velocity adjusted for each particle that takes random values which depend on the variables associated to Equation ( 16); v n−1 j represents the inertia of the movement associated with each particle; cv, the coefficient of velocity of each particle; learning factor c1 and c2; pbest, best position found for the particle; gbest, best position found by the group; x n j , current position of the particle; and x n−1 j , previous position of the particle: Designing a 4-CSK-LTF Constellation with d min = 5000 Hz and 10,000 Hz Two 4-CSK-LTF constellations with minimal distances d min = 5000 Hz and 10,000 Hz are designed using the PSO algorithm proposed in the previous section.The data for calculating the bias current of the RGB LED, its optical power and the set of the frequencies generated by the LTF converter was extracted from the characterization process of the transmitter and receiver.To design the 4-CSK-LTF constellation, the reference frequency f re f erence was set to 50,000 Hz, which points out that PSO should find two sets of colour points (x p , y p ) capable of generating a first set of frequencies starting at 50,000 Hz with a minimum distance of d min = 5000 Hz, and a second set of frequencies beginning at 50,000 Hz with a minimum distance of 10,000 Hz.The algorithm was configured as follows: number of particles of the PSO N = 200 and coefficients cv = 0.0002, c1 = 0.3, c2 = 0.7.These parameters were experimentally selected.

Theoretical Symbol Error Probability
This section analyses the SER probability as a figure of merit that characterises the performance of the M-CSK-LTF system.For this purpose, the M-PAM multilevel modulation scheme was used as a reference point [40].For M-CSK-LTF, the m-th symbol can be defined as follows: where E m = (K 1 P 1,m + K 2 P 2,m + K 3 P 3,m ) 2 represents the power associated with the m-th symbol; K i is the conversion value of the LTF given in Hz µW ; and P i,m , the value of the incident optical power on the detecting surface of the LTF given in µW, for channels i = 1, 2, 3. Additionally, the average symbol power of the M-CSK-LTF constellation is given by the average of all individual symbol power, i.e., In a manner similar to pulse amplitude modulation (PAM) [40], the minimum distance between M-CSK-LTF symbols can be written as If the separation between any two points of the constellation, d, is equal, then we get d min = d.Therefore, the equivalent baseband channel model for an intensity modulation (IM) direct detection (DD) system can be expressed as where r(t) is the received optical signal, s(t) is the output of the optical source; h(t), the response of the channel; n(t), the shot noise of the photodetector, modeled as additive white Gaussian noise (AWGN), that is, h(t) = δ(t) [18].The equivalent discrete time baseband channel model [18,20] (21) is, where n is the AWGN sample with n ∼ N(0, 1 2 N 0 ) [40] and S m was defined in Equation (22). Figure 9 shows an example of the received signal distribution given a M-CSK-LTF symbol is transmitted over the resulted AWGN channel.The optimum criterion to detect the transmitted symbol S m is related to the thresholds τ A and τ A+1 .Thus, any received signal outside these limits is considered an error.An error occurs when the transmitted symbol S j is detected as S k , where j = k for j, k = 1, 2, ...M.Moreover, for the symbols located on the edges, S 1 and S M , the probability of error can follow only one direction.In order to calculate the theoretical symbol error probability for M-CSK-LTF, we need to sum the probability of error of symbol S j being transmitted and symbol S k being detected for all j different from k in the constellation.Since all the symbols are equally likely to occur, the average probability of error P M of the constellation of a size M can be determined as follows where with P e ( ) as the probability that distance |r − S m | between the received signal r and transmitted symbol S m is greater than the distance |S m − τ| between the transmitted symbol and threshold, where τ can take the value of τ A or τ A+1 .Therefore, the estimated probability of error for symbol S m can be written as by replacing τ A+1 = S m + d 2 in (25) and considering that the distance |S m − τ| = d 2 , the expression is rewritten as follows If we define x = r − S m , then Equation (26) becomes where N 0 = 2σ 2 .Equation ( 27) can be equivalently expressed in terms of the complementary error function er f c() [41], resulting in From the above expression, we see that the probability of error is dictated by the distance between symbols and the noise variance.

Experimental Symbol Error Probability
This section aims to evaluate experimentally the probability of symbol error for the proposed VLC system using a 4-CSK-LTF constellation.Following the setup of the VLC system presented and described in Section 4, we determine the SER experimentally by adopting the Monte Carlo method and using Equation (28).
In 4-CSK-LTF scheme, 4 possible symbols may be transmitted, each symbol being assigned a unique frequency.Two examples were conducted, the first one used a separation between the constellation points of d = 5 kHz and the second with d = 10 kHz.In this way, each constellation symbol of the 4-CSK-LTF scheme was transmitted and the generated frequency at the output of the LTF converter was recorded with a TELEDYNE WAVEACE 2032 oscilloscope.Figure 10 presents the frequencies obtained experimentally for the two examples considered, with d min = 5 kHz and 10 kHz, respectively, and compares the values with those yielded by the PSO algorithm.The results shows a reduction of the minimum distance between symbols at the receiver.It can be observed in Figure 10a that the minimim distance is decreased from 5 kHz to 3.2 kHz, while in Figure 10b the minimum distance was lessened from 10 kHz to 5.4 kHz.Clearly, this could have a negative impact on the SER performance of the VLC system.

System Throughput
The transmission data rate of the proposed M-CSK-LTF system depends on the constellation size, M, and frequency f s = 1 T s , configured in the VLC transmitter, where T s defines the cycle of the symbol.Thus, the maximum bit rate of the proposed M-CSK-LTF system can thus be expressed as follows [18]:

Experimental Results
In this section, the SER performance of the M-CSK-LTF scheme in a VLC system is presented.Table 1 shows the 4-CSK-LTF constellation designs achieved by the PSO algorithm for minimum distances of d min = 5000 Hz and d min = 10, 000 Hz.The optical power vector p = [P 1 P 2 P 3 ] T , is given in µW; the bias current vector of the RGB LED i = [I 1 I 2 I 3 ] T , in mA; and the frequencies generated by the LTF, f LTF , in kHz.
The experimental and simulation results along with the theoretical curves are shown in Figure 11.The measurement of the SER as a function of SNR is plotted for a 4-CSK-LTF constellation with distances d min = 5 kHz and d min = 10 kHz, where the SNR expression is defined as A total of 1 × 10 6 symbols were randomly generated and transmitted for the Monte Carlo method.
The curves with dotted lines (square and circle markers) plot the theoretical SER versus SNR, and the curves with solid lines (black circle and plus sign markers) show the simulation SER for the different SNR.It is observed that a reduction of half of the minimum Euclidean distance yields a SER performance penalty of about 5 dB, as expressed in Equation ( 28).The fact that the experimental frequency values do not match with those obtained by the PSO algorithm, see Figure 10, it yields a mismatch in terms of the minimum distance, and consequently, there is a small loss in SER performance, as expected.Finally, the achievable system bit rate is calculated in Figure 12, following (29), for different constellation size, M, and f Tran at the transmitter.The results are shown for the 4, 8 and 16 CSK-LTF constellations, considering the transmitter frequencies of f Tran = 50, 200, and 400 kHz.Examing the throughput for each constellation size, it can be seen that the highest data rates are achieved with f Tran = 400 kHz, and the lowest by the frequency of f Tran = 50 kHz.For example, with f Tran = 400 kHz, the system yields data rates of 100, 150 and 200 kbits/s for the constellation sizes of M = 4, 8 and 16, respectively.Note that with a configuration of f Tran = 400 kHz, the data rates of the 4-CSK-LTF scheme is the same that the 16-CSK-LTF constellation but with a transmitter frequency of f Tran = 50 kHz.The maximum transmitter frequency was set to 400 kHz, avoiding the saturation of the LTF [30].

Conclusions
In this study, we implemented a novel design of a VLC system based on CSK modulation and an LTF converter as a signal detector.A heuristic optimization algorithm PSO was implemented to design constellations in the color space, suggesting different possible sets of solutions.This suggested that the system needs previous training so that the constellation complies with the requirements in a VLC system.This fact can influence the lighting desired by the user (cold or warm white light); even so, this issue can be solved with just adding an option in the lighting control, which can be entered as a constraint to make the constellation converge to a more specific one.Given the bit rate measured, we can say that one of the possible scenarios is the "internet-of-things", and further research will be made for this subject, since the length of the link will be different between devices and a compensation strategy of the frequencies should be implemented because the intensity will be mitigated by the free space loss phenomena.In this manner, data can be reliably retrieved.On the other hand, this proposal can be used in applications like electronic locks, access control systems, indoor location systems, smartphone contactless payments using screens or as an alternative to NFC for music streaming.In the Last possible application, a connection of a few centimeters is required, thus, the bit rate could be improved if the order of the M-CSK modulation is increased with low compromise of the SER.The last statement is based on the SNR penalty (5 dB) with a decreasing d min , a situation that is typically presented when constellations increase the number of symbols.

Figure 3 .
Figure 3. Electrical circuit of the transmitter.

Figure 4 .
Figure 4. Colour triangle produced by the RGB LED.

Figure 5 .
Figure 5. Electro-optical response of the RGB LED.4.3.3.Response of the LTF vs. Optical Power of the RGB LED 6 represents the normalized output frequency of the LTF.For normalization, we considered the maximum frequency generated in the LTF f max r = 33 kHz, f max g = 64.367kHz and f max b = 87.7 kHz for each incident optical power of the red, green and blue LEDs, respectively.In Equation (14), we expressed a set of linear relations which represent the mapping conducted by the LTF converter that was completed by a first-order polynomial regression, which is similar to determining the slope of the straight lines in Figure6.Equation (14) has the mathematical form f i = K i P i , where f i given in Hz represents the output frequency of the LTF, P i given in µW is the incident optical power on the photosensitive surface of the sensor and the numerical constants K i

Figure 6 .
Figure 6.Response of the LTF frequency to RGB powers.

Figure 9 .
Figure 9. Distribution of the received signal over the resulted AWGN channel.
2.1.CSK-Based VLC System Proposed by IEEE 802.15.7 2: Detect leading edge of the input signal.: Retrieved elapsed time and estimate frequency f m .9: Send frequency datum to the computer via serial port.
3: Start timer one.4: while Leading edge do 810: return f m

LTF Constellation with d min = 5000 Hz B m S m Point
(x p , y p )