# A Python-Based Indoor Channel Model with Multi-Wavelength Propagation for Color Shift Keying
## 1 Introduction  
Visible light communication (VLC) is a wireless method for transmitting data via the modulation of visible light intensity. VLC offers several advantages over traditional radio frequency (RF) wireless technologies [1]. One of its primary benefits is the substantial bandwidth available within the visible portion of the electromagnetic spectrum. VLC is also a cost-effective wireless solution for two main reasons: first, the electronic components utilized for VLC are simpler and less expensive compared to the specialized circuits required for RF modulation; second, VLC can be implemented using commercial light-emitting diodes (LEDs) already deployed in lighting systems, obviating the need to develop new optical antenna devices. Additionally, VLC is immune to electromagnetic interference (EMI), as the visible spectrum is not impacted by such interference. Therefore, VLC can be effectively utilized in environments such as hospitals, where where RF technologies are restricted due to the potential for EMI to interfere with and disrupt monitoring instruments. The IEEE 802.15.7 standard [2] was introduced with the objective of standardizing the various schemes for communication with visible light and defining the modulation techniques. This standard presents three IM/DD modulation schemes: on-off keying (OOK), variable pulse position modulation (VPPM), and color shift keying (CSK). It should be noted that there are other techniques not presented in this document, including metameric modulation and orthogonal frequency division multiplexing (OFDM). CSK employs three or more distinct wavelengths for data transmission, effectively leveraging spectral diversity to encode information. This modulation technique utilizesWDM alongside a constellation of symbols to represent bits of information [3]. The block diagram in Figure 1 illustrates a CSK modulator based on three LEDs and three photodetectors. The digital-to-analog converter (DAC), driver, and LEDs constitute the analog front-end on the transmitter side, while the photodetectors (PD), signal adapter, and analog-to-digital converter (ADC) form the analog front-end on the receiver side. Additionally, the color coding, color-to-intensity conversion, and channel estimation sequence represent the logical components required to implement the CSK modulation scheme. The channel depicted in this diagram highlights the potential interference that may arise among the three color bands. The modulation process of CSK is carried out as follows. First, a bit stream at the input of the color coding block is mapped to a specific point in the CIE 1931 color space. In the CIE 1931 color space, a set of points represents symbols of the constellation, such as M -QAM or M-PSK. Each color point represents a combination of bits. This indicates that four symbols are needed to encode two bits per symbol, eight symbols to encode three bits, and sixteen symbols to encode four bits, with the number of symbols increasing correspondingly as the bit count per symbol increases. Figure 2 shows the CSK format for 4, 8, and 16 color points and their corresponding mapping rules according to the IEEE 802.15.7 standard [2]. As shown in the 4-CSK mapping image, the vertices of the triangle are the intrinsic color points of each band, that is, the intrinsic color point of each RGB-LED. The output of the color coding is the \((x_{d},y_{d})\) coordinate of the corresponding color that is mapped, which forms the input for the color-to-intensity coder block. Because the color point must be generated with a specific combination of the three \(ijk\)-bands, this block encodes each \([x_{d},y_{d}]\) value to the corresponding \([P_{i},P_{j},P_{k}]_{d}\) values, where \(P_{i}\) represents the optical power of band i (red LED) to generate the \(d\)-color point, \(P_{j}\) represents the optical power of band j (green LED), and \(P_{k}\) represents the optical power of band k (blue LED). The relationship between the color coordinates and optical power values is expressed as follows:  
\[