Efficient Channel Coding for Dimmable Visible Light Communications System

Visible light communication (VLC) offers wireless communication within short-range based on wavelength converters and light-emitting diode (LED). In the VLC system, conventional forward error correction (FEC) codes are not guaranteed to provide flicker mitigation and dimming support. Consequently, modified coding schemes are introduced for reliable VLC. These methods require complicated coding structures, use of lookup tables, and the addition of large redundancy, resulting to increased computational complexity and low transmission efficiency. In this article, we propose a coding scheme that is flicker-free and enhances the transmission efficiency for VLC systems. The proposed scheme is based on polar codes (PC) and Knuth balancing code with enhanced prefix coding technique. The results show that the proposed algorithm exhibits improved transmission efficiency compared to the PC without and with run-length limited code, for dimming values 75% (or 25%) and 87.5% (or 12.5%). Also, the proposed scheme presents a significant bit error rate (BER) performance gain compared to the schemes in literature. The proposed scheme is flicker-free, provides a simple encoding structure, does not utilize lookup tables, generates minimal number of redundancies for energy efficiency. Thus, the approach is flexible, and it is more suitable for real-time VLC systems.


I. INTRODUCTION
Visible light communication (VLC) offers an appealing and economical platform for both illumination and communication. At the transmitter, white light is produced based on wavelength converters and light-emitting diode (LED). Generally, the brightness and intensity of light are influenced by the representation of 1's and 0's in the frames. This implies that the LEDs are switched 'ON' or 'OFF' depending on whether the data bits are 1 or 0. The data to be transmitted is mapped to light sources and thus, requires efficient modulation to avoid disrupting the length of 1's and 0's in the transmitted data, which may cause flickering. In addition, the dimming level used for the modulation should be selected such that it is compatible with the illuminating LEDs for power savings and transmission efficiency. Hence, flicker mitigation and dimming support is a major challenge for VLC to maintain its full potential.
In IEEE VLC standard [1], DC-balanced run-length limited (RLL) line codes such as Manchester codes or 1b2b are The associate editor coordinating the review of this manuscript and approving it for publication was Barbara Masini . recommended for intensity modulation with direct detection (IM/DD) VLC systems to prevent flickering and provide dimming support. In this case, Reed-Solomon (RS) codes, combined with their convolutional codes were utilized as forward error correction (FEC) codes. Therefore, FEC and RLL line encoding were performed to provide DC balance and flicker mitigation. However, the code rate of the RLL line codes is generally less than 1, which reduces the transmission efficiency of the system.
Consequently, several enhanced FEC coding techniques that consider flicker mitigation and support dimming using compensation symbols (CS) have been proposed in the literature [2]- [7], to enhance the efficiency of coding and overall performance of VLC systems. Many of these FEC codes do not guarantee the same probabilities of 1's and 0's (ON/OFF), and short runs of 1's and 0's. As such, additional coding algorithms such as code puncturing, scrambling, RLL line codes and so on are still needed. Moreover, the Low-density parity-check (LDPC) codes [2] and Turbo codes [7] have complicated coding structures, resulting in relatively high overhead coding and low transmission efficiency.
FEC coding schemes based on polar codes for dimmable VLC with ON-OFF keying (OOK) modulation have recently been proposed in [8], [9]. The authors in [8], utilized the recursive channel combination structure of polar codes to implement FEC codes without incorporating RLL line codes. However, polar code encoding does not completely produce flicker-free codewords. In [9], the polar codes with RLL line codes and compensation symbols were utilized for VLC dimming control. Although, puncturing was proposed to shorten the code length, the transmission efficiency was still low due to the RLL codes.
In this article, we propose a dimming efficient and flicker-free FEC for VLC systems based on Knuth's balancing algorithm [10] with enhanced prefix coding technique. Balanced codes (BCs) are used to correct/detect errors within communication channels, and can be implemented to conform with a DC-free channel input constraint. The BC has been applied for digital recording of data on optical and magnetic storage disks, cable transmissions, and noise attenuation in VLSI systems [11]. The proposed algorithm offers a simple encoding structure, capable of reducing the coding overhead associated with the existing coding schemes for dimmable VLC. Also, the algorithm does not require look-up tables and utilizes minimal redundancy. This simplicity will be utilized for enhanced rates of data transmission in comparison with the RLL based methods while saving energy and yielding less complexity. The bit error rate (BER) performance of the proposed scheme is evaluated using computer simulations. The results for different dimming target values show that the proposed scheme exhibits enhanced transmission efficiency. Likewise, the proposed scheme yields significant BER gains compared to the schemes in literature.
The remaining parts of this article are arranged as follows. Section II is a preliminary discussion of the existing polar codes and the Knuth's balancing code for dimmable VLC. The proposed concatenation of the polar code with the Knuth's balancing code, and the implementation of enhanced prefix coding technique is explained in Section III. Numerical results are obtained and analyzed in Section IV. Section V concludes the article.

A. POLAR CODES
The FEC codes are essential in VLC for a reliable IoT system. Polar code (PC) is a class of error-correcting codes that provides the first definite proof of approaching channel capability [12]. The PC codes are based on the concept of channel polarization. Polar code of length N can be described using a N × N generator matrix G in a n th recursive (Kornecker product ⊕) definition. Suppose F 2 = 1 0 1 1 is the standard kernel for defining the code, the n-depth Kronecker product of n copies of F is expressed as where n = log 2 N .
The polar code encoding of message m, with length K can be represented as P(N , K ), where K ≤ N . The code rate is given as To define the P(N , K ) encoder, a vector u of length N bits is formed based on the channels' reliability sequence as follows: 1. Find (N − K ) least reliable channels from the reliability sequence 2. Set the first N − K least reliable positions for the (N −K ) channels to zero, known as the frozen positions 3. Set the remaining K most reliable positions as the message positions. This implies that the K bits message can be extended to u of size N by inserting (N − K ) frozen bits into the message, since the generator matrix is N ×N matrix. Hence, a codeword c = uG N is obtained by a polar transform of u. Polar codes are generally decoded based on successive cancellation (SC) as shown in [12], [13]. The SC decoding requires passing messages on a binary tree traversal where every node on the binary tree is expected to perform certain operations. Suppose an inner node receives some beliefs from the parent. This node first sends some beliefs to the left child and receives back decisions from the left child. Thereafter, the inner node sends some beliefs to the right child. Once the inner node receives decision bits from the right child, the two decisions (from the left child and right child) are merged and sent back to the parent. The decoding complexity is given as O(N log 2 N ), since the depth of the tree is n + 1 with N leaf nodes [12], [14].

B. KNUTH's BALANCING CODE
A binary code of length N is said to be balanced if it contains the same number of zeros and ones in the binary sequence, for even N . Balanced codes were introduced in [10] as a subgroup of unordered codes. They have the property that the positions of ones in a codeword cannot be contained in the position of the ones in another codeword. In the case where all the codewords have the same Hamming weight, the code is referred to as a constant weighted binary code. The Knuth's construction of balanced codewords in [10] has gained much attention as it does not utilize lookup tables; thus making it simple to implement in real time. The balanced codewords were efficiently generated by flipping the first m bits of the codeword c, where 1 ≤ m ≤ N . Knuth has shown that there is always a point m somewhere along c, where a balanced codeword x is obtained if the sequence is inverted up to that point, such that For instance, assume c = 1011111 is to be balanced using the Knuth's algorithm. The set of words legally associated with the balanced codeword x is given by The bits are flipped to m = 4, which is the cardinality of |σ x |. In [15], it was further discussed that m is not necessarily VOLUME 8, 2020 An efficient encoder will transmit the balanced codeword along with the smallest number of prefix possible. The prefix p in Knuth's construction is shown to be approximately log 2 N , N 1, while p is about (1/2 log 2 N + 0.326) for a complete set of balanced codewords. Therefore, redundancy of using the Knuth's balancing scheme for long codeword lengths is almost double as compared to codes that use complete sets of balanced codewords.
Improvements of the traditional Knuth's algorithm are considered in [16], [17]. Of interest is the new prefix coding technique for balancing codewords in [17] with reduced redundant than Knuth's construction. The number of bits required to represent the index was achieved by either a fixed prefix length (FPL) method or variable prefix length (VPL) method. The prefix of the FPL must contain (N /2 + 1) values of I (c) in the worst case, whereas that of the VPL depends on x and must contain all possible values of I (c). The number of bits needed to represent the index of the VPL varies between 1 and log 2 (N /2 + 1). This scheme was shown to be more effective than the traditional Knuth method with prefix of length log 2 N . The ceiling function, · returns the least integer value. We therefore propose an efficient encoding method with a number of bits varying between the upper and lower limits of the VPL. Fig. 1 shows the block diagram of the proposed channel coding technique for dimmable VLC system. At the transmitter end, a message m of length k is encoded using a FEC encoder to obtain a codeword c. Thereafter, c is encoded using the traditional Knuth algorithm [10], which computes a balanced codeword x and balancing index I (c). The index is further encoded to a prefix p of length varying between 1 and log 2 (N /2 + 1) by uniquely representing I (c) as base-2 expansion:

III. PROPOSED CODING SCHEME
where k is a positive integer, b is the base value (base-2), and a i , i = 0, 1, 2, · · · k are binary integers (0 or 1).
All coefficients a i of the polynomial are obtained in the following steps: Step 1: Divide I (c) by b to generate a quotient q and remainder r. That is, where r 0 corresponds to the last digit in (5).
Step 2: Divide the initial quotient q 0 by b to obtain a new quotient q 1 and remainder r 1 as: where r 1 is the second to last digit of the polynomial in (5).
Step 3: The process of consecutively dividing previous quotients by b to derive additional r continues until q = 0. The remainder r in each step corresponds to the values of a i in corresponding positions, that is, r 0= a 0 , r 1= a 1 , · · · , r k= a k . Thus, I (c) is represented as a k , · · · , a 1 , a 0 . The operation of representing I (c) as base-2 expansion is summarized in Algorithm 1.

Algorithm 1 Base-2 Expansion of I (c)
Input: I (c), b. Output: Prefix p. q := I (c); k := 0; repeat compute r k := q mod b; q := q ÷ b; k := k + 1; q : = 0 = false; until q := 0 = true; p = a k , · · · , a 1 , a 0= r k , · · · , r 1 , r 0 The following example illustrates representing a balancing index I (c) to prefix p. Suppose I (c) = 4, the base-2 expansion of 4 is given by: In (8), note that all summands will be even numbers except a 0 since they are multiples of two. Therefore, we infer that a 0 = 0 for even I (c), while a 0 = 1 if I (c) is odd. Here, I (c) = 4 is even and thus (8) becomes: Next, the value of a 1 is obtained by factoring out 2 in (9), which generates a quotient q as follows: Since q = 2 is even, we have a 1 = 0. Furthermore, writing out the inner polynomial in (10), and applying the same logic, we have: The process of factoring 2 continues till q = 0. Moreover, q = 1 and odd in (11). This implies that one summand is left, and the value of a 2 = 1. Therefore, we obtain: Thus, the integer number I (c) = 4 is represented as p = 100 , which are the corresponding values a 2 = 1, a 1 = 0, and a 0 = 0 at each step. The obtained prefix is further balanced using the Knuth's algorithm and appended to x. Hence, the obtained concatenated sequence x of length n b is sent through a dimming compensator, which inserts compensation symbols. The approaches for CS insertion could be the time-domain approach, classified into intra-pulse insertion and inter-pulse padding according to the position at which the dimming compensation symbols are placed in the data frame, or the intensity (frequency) domain approach, such as bias scaling and distribution adaptation.
In this study, the inter-pulse padding approach is utilized such that the dimming compensator appends suitable number n c of CS as a suffix to x , according to desired dimming target values d. The number of compensation symbols to be added to x for a desired d is given by: where W is the weight of the balanced codeword. Note that the x is guaranteed to have 50% dimming value without the addition of CS. This implies that x contains equal proportion of 'ON' symbol (1's) and 'OFF' symbol (0's). The transmission efficiency of the VLC system is obtained by: Thus, the resulting sequence y, with n = n b +n c bit data frame is modulated using ON-OFF keying (OOK) modulation. This modulated light intensity signal s of length n is transmitted over an additive white Gaussian noise (AWGN) channel.

IV. RESULTS AND ANALYSIS A. CODEWORD WEIGHT DISTRIBUTION FOR DIMMING SUPPORT
The weight (number of ones) of a codeword corresponds to the typical light intensity during the period of transmission. Thus, we analyze the proportion of 1's and 0's in the proposed balanced codeword for 10,000 iterations. Result of the proposed scheme is compared to the traditional polar codes without DC-balanced line coding for low rate P(2048, 512), half rate P(2048, 1024), and high rate P(2048, 1536) codes. Fig. 2 shows about 93% of the codewords cluster around 1024, which is half of the codeword length. This implies  that not all codewords would contain equal number of 1's and 0's. Therefore, DC-balancing coding methods such as scrambling [6] and run-length limited (RLL) coding [2] are needed to obtain balanced codewords. Fig. 3 shows the codeword weight distribution of the proposed scheme. The Knuth algorithm generates balanced number of 0's and 1's in the codewords at rates, R = 0.25, 0.5, and 0.75, to satisfy d = 50%. Also, the proposed scheme utilizes a reduced number of redundant bits while increasing the data transmission rate compared to regular RLL codes. For instance, the proposed scheme has redundancy r = log 2 (N /2 + 1) compared to the Manchester codes; 1b2b, 4b6b, and 8b10b with redundancies of N , N /2, and N /4 respectively. As a result, minimal LED power is dissipated for effective VLC communication.

B. RUN-LENGTH ANALYSIS
The length of 1's and 0's in a codeword depicts the temporal intensity over a short time period. This can lead to flickering, that is, significant fluctuations in the brightness of light, causing damage to human eye. Thus, the length of 1's and 0's in the codeword (run-length) should be properly shortened to minimize any possible flicker arising from modulating  Fig 4(d) shows that the PC scheme exhibit a maximum run-length of l = 24, which occurs twice within the total number of 10, 000 iterations. Moreover, the proposed scheme yields a maximum run-length of l = 12, occuring once within the total number of iterations. This implies that 0.6 ms flickering time period ( MFTP), corresponding to 16, 667 Hz light switching frequency ( eye safety frequency) is required to transmit the 12 bits in a VLC system with the lowest optical clock rate of 200 kHz.

C. TRANSMISSION EFFICIENCY
The transmission efficiency of the proposed algorithm is compared to the polar code scheme without concatenation (PC) in [8] and with concatenation (PC-RLL) in [9]. For fair comparison, we consider the target values, d = 50%, 75%, and 87.5%, while the FEC code rate remains constant. Table 1 shows the different dimming target values and transmission efficiency of the proposed scheme, conventional PC and PC-RLL.
As shown in Table 1, all the schemes retain the DC-balancing property at d = 50% and thus, no CS is required. Also, the transmission efficiency of the proposed scheme reasonably compares to the PC, while the PC-RLL yields the least transmission efficiency with a code rate of 0.250 compared to the PC and proposed scheme with code rates of 0.5 and 0.4947 respectively at d = 50%. The performance loss of the PC-RLL is due to the number of redundancy added by the RLL (1b2b) code. Unlike the polar code that transmits codewords without RLL line codes, the 1b2b adds redundancy of length r = N compared to the proposed scheme that transmits a prefix of length log 2 (N /2 + 1) along with the balanced code. Note that large redundancy reduces the efficiency of the code.
Additionally, the result in Table 1 shows that increasing or decreasing the dimming value from 50% increases the number of inserted CS, which inevitably reduces the transmission efficiency of the schemes. For 75% (or 25%), the PC-RLL inserts 2048 CS as compared to 1024 and 517 CS in the PC and proposed scheme respectively. Furthermore, increasing (or decreasing) the dimming to 87.5% (or 12.5%), the PC-RLL adds the largest number of CS (6144) as compared to the PC with 1536 CS and the proposed scheme with the least number of CS (776) Consequently, the proposed scheme exhibits highest transmission efficiency as compared to the PC without RLL and PC with RLL since the proposed scheme inserts the least number of CS for dimming target values of 75% (or 25%), and 87.5% (or 12.5%). Hence, the proposed scheme can be used in real-time VLC system since it requires minimal energy for dimming and transmission.

D. ERROR CORRECTION PERFORMANCE
Simulation results are presented to compare the error rate performance of the proposed scheme with other schemes in the literature using the OOK modulation with rate R = 0.5, over the AWGN channel.
The bit error rate (BER) performance of the proposed scheme is compared to the polar code without RLL line codes in [8] and with RLL line codes in [9]. Note that the average received signal-to-noise ratio (SNR) for VLC environment is 15.4 dB [19]. Therefore, the comparison is based on the received energy per bit to noise power spectral density ratio (E b /N 0 = SNR/R) for different dimming target values, d = 50%, 75% (or 25%) and 87.5% (or 12.5%). The number of iterations is 10,000, and the soft-input SC decoder is used for decoding transmitted codewords in the schemes. The following representations are used in the legends. PC refers to the polar codes in [8], PC-RLL represents the polar code with 1b2b line code in [9], and PC-Knuth symbolizes the proposed polar code with modified Knuth scheme.  In Fig. 5, the PC-Knuth scheme exhibits about the same performance with the PC and PC-RLL schemes for d = 50% at BER of 10 −4 . Increasing (or decreasing) the dimming to d = 75% (or 25%), the PC-Knuth has comparative result with PC-RLL at BER of 10 −4 . Moreover, the PC-Knuth exhibits a performance gain of about 0.5dB in comparison to the PC scheme at BER of 10 −4 . For d = 87.5% (or 12.5%), the performance of the PC-Knuth further reasonably compares to the performance of the PC-RLL and exhibits a performance gain of about 0.6 dB compared to the PC at BER of 10 −5 . The result shows that the use of only PC codes without code balancing algorithms or RLL line codes to obtain DC-balanced and run-length limited codewords in VLC yields reduced BER performance. The RLL line codes such as 1b2b also add more redundancy compared to the proposed scheme. This generates a high computational complexity of decoding, requiring more memory in VLC system. Thus, the proposed scheme is an effective scheme suitable for the VLC. Fig 6 shows BER performance comparison of the proposed PC-Knuth and two reference schemes: Reed-Solomon (RS) codes [1] and low-density parity-check (LDPC) codes [2] for dimming target values d = 75% (or 25%) and d = 87.5% (or 12.5%). We consider using half rate RS(64, 32) among other codes given for VLC standard in [1], since it is similar to the rate of the polar code in this study. For d = 75% (or 25%), result shows that the proposed PC-Knuth scheme exhibits E b /N 0 performance gains of 1.0 dB and 4.0 dB at BER of 10 −5 compared to the LDPC and RS codes respectively. Furthermore, increasing (or decreasing) the dimming value to d = 87.5% (or 12.5%) indicates that the proposed PC-Knuth scheme yields performance gains of 0.9 dB and 3.5 dB at BER of 10 −5 in comparison with the LDPC and RS codes respectively.

V. CONCLUSION
In this article, we presented an efficient flicker-free channel coding scheme based on concatenation of polar codes and modified Knuth code balancing algorithm for dimmable VLC. As compared to existing DC-balanced coding techniques such as RLL line codes, the proposed scheme generates balanced codewords and utilizes a reduced number of redundancy while increasing the data transmission rate. The transmission efficiency of the proposed scheme reasonably compares to that of the conventional polar code for equal probabilities of ''ON'''s and ''OFF'''s. Moreover, numerical results show that the proposed scheme produces higher transmission efficiency for different target dimming values. Simulation results compared the proposed PC-Knuth scheme to polar code without concatenation, polar codes with RLL code, LDPC code, and RS code using the OOK modulation in AWGN channels. The results show that the proposed PC-Knuth scheme significantly outperforms the conventional PC, LDPC, and RS codes, while it offers a reasonably BER performance compared to the PC-RLL. A significant remark is that the proposed scheme provides a simple encoding structure, does not use look-up tables, inserts less redundancy and saves energy, which makes it applicable for real-time VLC systems.
OLUWASEYI PAUL BABALOLA (Member, IEEE) received the B.Sc. degree in mathematics from the University of Ibadan, Nigeria, in 2009, the M.Sc. degree in electrical engineering from the University of the Witwatersrand, Johannesburg, South Africa, in 2017, and the Ph.D. degree in electronic engineering from Stellenbosch University, South Africa, in 2020. He is currently a Postdoctoral Research Fellow with the Department of Electrical, Electronics, and Computer Science Engineering, Cape Peninsula University of Technology-Bellville, South Africa. His research interests include advanced error-correcting coding, the IoT, machine learning/artificial intelligence, digital signal processing techniques with applications to wireless communications, acoustic communications, and storage systems.