Phase Characterization and Correction in a Hardware Implementation of an OFDM-Based System for VLC Applications

Orthogonal frequency-division multiplexing (OFDM) systems have been widely implemented in guided and non-guided communications. Even though they are becoming a standard for popular technologies such as WiFi, their implementation in newly emerging ones is still in evolution. As the number of connected devices increases, the radio frequency (RF) channel gets crowded. Here is where visible light communication (VLC) links gain interest. VLC offers a wireless alternative to RF with a trade-off between the necessity of line of sight with the offer of a free, highly secure, and immune to electromagnetic interference communication channel. This paper proposes a programmable software implementation of an OFDM system using a novel phase correction technique for VLC channels. The new equation considers two types of phase shifts, one that will be non-deterministic (has a random variation) and another that will be deterministic and, therefore, can be estimated and corrected. This second can be split into two: one that comes from the clock differences and has more impact on higher subcarriers, and the second that appears from the electronics of the link and will directly impact the symbols' phase. The main difference with current phase correction techniques is the identification and estimation of the deterministic noise specific to VLC systems. The deterministic noise impact all subcarriers equally and must be subtracted before the measure of the shift induced by the differences between the transmitter and receiver clocks. Another difference is that the analysis and tests have been done with data collected in an actual hardware implementation.


I. INTRODUCTION
V ISIBLE light communication (VLC) systems have been growing in the past decade, mainly because these communication systems can be deployed in environments with high electromagnetic interference, or where electromagnetic signals are restricted. Moreover, the radio frequency channel is increasingly becoming more and more saturated because of the augmenting number of interconnected devices [1]. VLCs have an unguided propagation media, which implies flexibility Manuscript  and adaptability in their applications. Another relevant factor of VLC links is that they can be implemented using preexisting infrastructure, e.g., illumination lamps [2]. Even though OFDM has been used for many years, its robustness and capacity to overlap sub-carriers (bandwidth efficiency) make it still interesting for new communication channels, as is the case for VLC links. OFDM also has a lower bit error ratio (BER) and better optical efficiency than other simpler modulation schemes [3].
One of the principles of OFDM modulation is the orthogonality, which allows the use of overlapped subcarriers on the frequency domain without creating interferences between them. Therefore, maintaining the orthogonality of the subcarriers on the receiver side becomes crucial. Synchronization errors could destroy the orthogonality [4], and as a consequence, synchronization methods are a focus point of OFDM schemes. Additionally, degradation of the orthogonality increases the bit error ratio of the link. Some of the problems that have to be corrected during the synchronization stage include time offset, carrier frequency offset (CFO), sampling frequency offset (SFO), and phase noise (PN).
In practical implementations, the receiver is isolated from the transmitter, having both parts of the system independent clocks. As mentioned before, OFDM systems have been used for other communications channels. Therefore some solutions for the SFO problem have been suggested. One alternative is to send the transmitter clock (CLK) signal mixed with the data information through the light-emitting diode (LED) [5]. The downside is that it requires high bandwidth (or reduces the one available for the data) to have a free frequency range to send the clock signal. Another approach could be a synchronization technique using substractions and Gaussian windowing, as proposed in [6]. Nevertheless, the implementation requieres a lot of training symbols which would not be suitable for solutions with a relatively small bandwidth and burst transmissions. A different option could be using known data to estimate and compensate the SFO. This known data is sent in the pilot symbols, and then the received value is compared with the desired one [7]. This would require hardware capable of performing multiplication operations to estimate the phase shift. A better approximation to obtain the SFO value from the pilot symbols is proposed in this article. Moreover, FPGAs are used to perform all the mathematical calculations. The implementation of OFDM modulation schemes to VLC channels must consider the particularities of these kinds of channels. When a LED is used as the signal emitter, the transmitted signal must be positive and real. That transmitted real signal has commonly been obtained in two ways. The first one is by separating the complex signal into in-phase (I) and quadrature (Q) signals. Then I and Q signals are mixed using a carrier frequency to be transmitted over the communication channel. The second one, which is the one implemented in this work, uses the property of hermitian symmetry [8]. That means that each sub-carrier value must contain its complex conjugate to obtain a real signal output at the IFFT [9]. As a consequence, the number of sub-carriers with information is reduced by half, but in exchange, the design gains flexibility and has lower analog complexity. The reduction in the hardware used for the implementation is helpful for small solutions and hardware miniaturization. Furthermore, the problems due to I/Q imbalance are avoided.
The transmitted information using an OFDM scheme is divided and modulated individually on each subcarrier, yielding the implementation of powerful coding techniques to reach higher data rates.
In this work, the impact and correction of the SFO and the noise added by the VLC channel are going to be discussed. The system has been implemented on hardware, allowing us to identify behaviors inherent to VLC channels in a real environment and their impact in the received phase of OFDM modulations. The OFDM was tested using quadrature Phase Shift Keying (QPSK). In the second section, the SFO, and the non-deterministic noise, alongside the methods for its correction and estimation are discussed. In the third section, the experimental setup used for the measurements, characterization, and the newly proposed method is described. Then, in the fourth section, the modulation characterization and the results using a classical correction are shown. Finally, in section five the proposed correction of phase on the frequency domain is developed.
II. IMPACT OF THE SAMPLING FREQUENCY OFFSET Suppose an OFDM system like the one depicted in Fig. 1. The "data in" is a sequence of M complex symbols that represents the constellation points of the transmitted data. Those M symbols are then modulated into M subcarriers by applying the inverse fast Fourier transform (IFFT), obtaining: Where din(i) is the data symbol in the ith subcarrier, and s(k) is the kth sample of the OFDM symbol [10]. The received signal under the assumption of a single-path channel will be then: where w(k) is additive white Gaussian noise (AWGN) and τ is the time offset at the receiver. The time offset appears because of two factors. The first one comes because the crystal oscillator used for the signal generation at the transmitter and the one used for sampling at the receiver are different and independent from the other. The other one is because of the errors in the time synchronization process, as the symbols are not exactly at the same point in TX and RX. Then, the received signal is demodulated using the fast Fourier transform (FFT), obtaining: is the phase rotation of each symbol due to the time offset τ [11].
All subcarriers experience the same sampling delay, but as each has a distinct central frequency, the symbol rotation is different. Therefore, to correct the introduced phase offset, the following expression is used: where Δθ i is the angle difference due to the mismatch between fs and fs ' (Fig. 1) in the ith subcarrier. In the case of this implementation, which follows the standard IEEE802.11a, the number of subcarriers M is 64, distributed as shown in Fig. 2. The delay τ is obtained from the four pilot subcarriers that are contained on each OFDM symbol. These subcarriers are used because they always contain known information, as the data position is always the same. Therefore, the resulting delay (τ ) is used to get the correct angle of the remaining subcarriers. The four pilot subcarriers are always modulated in BPSK, no matter the modulation scheme chosen for the other subcarriers. This implementation exploits the capacity of the OFDM to modulate each subcarrier independently.
In particular, the OFDM type used in the experiment is DCbiased optical OFDM (DCO-OFDM). It is because the implementation uses an optical intensity modulated/direct detection (IM/DD) optical system. Even though other types of modulations for optical channels exist, such as asymmetrically clipped optical OFDM (ACO-OFDM), the multipurpose of the system to serve as a communication channel and as an illumination source, the drawback of power consumption of DCO-OFDM is, in this case, an advantage.
In the same way, the transmitted signal must be real. For this reason, the OFDM symbols are structured using hermitian symmetry to achieve it. Wich allows obtaining a real signal after the IFFT stage in exchange for reducing by half the total effective subcarriers of the symbol.  III. EXPERIMENTAL SETUP Fig. 3 shows the experimental setup. All the measurements and characterizations were done over the same system, which allows for comparing the obtained results with the different correction methods. The source of light is an array of two LUW CN7N ultra white LEDs from OSRAM. The light beam is adjusted using the reflector F15558 MIRELLA-G2-S from Ledil. The LEDs are connected to a driver using an SMA cable and, the transmitted signal is generated by an FPGA. The implementation is done with a hardware platform in Vivado Design Suite. The technology used is the ZYBO development board based on the Xilinx Zynq-7000 family. More especificly the Xilinx Zynq 7020.
The LED LUW CN7N has an optical bandwidth of around 1.5 MHz and, after the implementation of an equalization stage, it reaches up to 15 MHz. The bandwidth used for the communication (the one that is going to be divided into subcarriers) is 10 MHz.
On the other hand, the photodetector (PD) used is the BP 104 S from OSRAM. The photodetector has a driver that amplifies the received signal to levels that can be handled in the FPGA. In the reception is also used a Fresnel lens to maximize the received signal.
The implementation uses two low-consumption LEDs. Each LUW CN7N works over a mean current of 170 mA and consumes 500 mW. Since the current offset is 170 mA, equivalent to 3.2 V, the maximum signal excursion to avoid signal clipping in the transmitter is 120 mV. In the case of this implementation, the clipping will be at the lower level because the room for the upper clipping is higher. The LEDs used must be ultra-white and are chosen because these types of LEDs have most of the emitted optical power in the blue wavelength, which is faster than the yellow. With a relative spectral emission of 1 at 440 nm and 0.5 at 550 nm. The setup is intended therefore to be small and low consumption. In this sense, the photodetector BP 104 S also has a small footprint, typically 4.84 mm 2 . The Fresnel lens used in all the measurements has 15 mm in diameter and has a focal length of 10 mm, which allows the placement of the lens near the PD.
The data flow will follow Fig. 1, which means that the OFDM-generated symbols will pass through the digital to analog converter (DAC), and then the driver will convert the resulting bipolar signal into a unipolar one that can be transmitted using the LED. Therefore, the non-negativity of the signal needed to commute the LED is always provided by the DC bias and is independent of the IFFT output. In the receiver, along with the signal amplification stages, there is a high-pass filter that will remove the DC component of the signal. That is because it does not contain information and can saturate the amplifiers when it has more power than the sub-carriers. After the signal is amplified, it is transformed to digital using an analog to digital converter and passed to the FPGA in a 10-bit signal.
The DAC and ADC clock signals are generated by crystal oscillators with a frequency of 40 MHz and have a tolerance of 2 ppm at 25 • C. In particular, the ones used in this implementation are the ECS-TXO-2016 family from ECS. These signals are also used as input to the FPGA to ensure synchronization between the samples and the digital hardware. Using the internal clock of the FPGAs was discarded after verifying experimentally that the output quality through the ZYBO PMOD connector was not suitable for this application.

IV. MODULATION CHARACTERIZATION
The correct reception and windowing of the OFDM package are assured so that the time offset τ will be less than 1 sample [12]. The signals used to plot and verify the distribution of the information contained on each symbol are real, and they were generated by the transmitting ZYBO located at the emitter. The signals are then collected using the Integrated Logic Analyzer (ILA) [13] in the Vivado Design Suite environment in the receiving ZYBO situated at the receiver. Therefore, the information passes through the whole system before it is captured.
The signals resulting from the ILA are processed and analyzed using MATLAB. The proposed algorithm is also tested on the real system to verify the results of real-time communication. Fig. 4(a) shows the start of a captured signal. The OFDM symbols contained on the signal are decoded by removing the cyclic prefix, i.e. the first 16 samples of each OFDM symbol. Then, the resulting samples are converted from the time domain to the frequency domain to restore the original data coded in the emitter. Fig. 4(b) shows the resulting constellation of one of the OFDM symbols contained in the Fig. 4(a) signal. The constellation shows in blue the data transmitted in the first 26 subcarriers and in red their respective complex conjugated symbols. The symbols shown are not yet corrected, so the constellation shows the symbol distribution as received. As the pilots must satisfy the hermitian symmetry, pilots 1 and 2 (subcarriers 7 and 21) have their respective complex conjugated symbols in pilots 3 and 4 (subcarriers 43 and 57).
For better visualization, and since the higher subcarriers contain only the complex conjugated values, from now on, corrections will be tested on the first 26 subcarriers which contain the transmitted information.
The typical way to correct this frequency displacement is by using 4, obtaining the delay τ with the pilots, and then adjusting each subcarrier with its respective number. But, in our case after applying the angle correction, it was not enough. That means that the signal is affected by other factors besides the SFO. These factors are due to the VLC channel and are going to be discussed in next section.

V. PROPOSED PHASE CORRECTION IMPLEMENTATION
The first aspect deduced from the experimental data was that the symbols have dispersion. That dispersion happens because of the non-deterministic noise of the channel, as it is non-guided. Ambient factors could also impact the noise level. On the other hand, the receptor will always have inherent noise due to the electronics.
This dispersion affects the estimation of the delay τ previously mentioned. Therefore, a mobile average of the pilots is calculated to reduce the received data dispersion and obtain a more accurate value.
Note that the non-deterministic noise is assumed to affect all the subcarriers and cannot be corrected, and can only be mitigated by averaging as many samples as possible. Thus, it is suggested to have at least a minimum value of SNR that ensures that the dispersion is small enough to maintain the symbols in their respective quadrant. As the modulation scheme goes more complex, the minimum required SNR level becomes higher.
The other key aspect that improves the angle correction is the identification of a phase shift induced by the channel, which affects all the subcarriers equally. Therefore, it does not depend on the position of the subcarrier as it does for the SFO.
Then, the new proposed angle difference between data in and data out in the ith subcarrier will be: Where n d represents the deterministic noise that is independent of i, and n nd represents the non-deterministic noise that is different for each symbol.
The non-deterministic noise is considered to have a Gaussian distribution. For simplification purposes, it is considered to have zero mean and variance σ 2 [n nd ∼ N (0, σ 2 )], as in cases where the non-deterministic noise has a mean other than zero, it can be decomposed in two parts, one where the mean is zero and an additional constant term that can be added to the deterministic noise as shown in (6).
Where n d = n d + n mean nd . Therefore, (6) always results in an equivalent of (5).
To estimate the value of the deterministic noise can be used any two subcarrier angles. Then the angle of each one is multiplied by the number of the other subcarrier as follows: The two subcarriers used for the calculation must be the pilots, as the non-deterministic noise is reduced by a dynamic average of the last 16 OFDM symbols. For instance, when the 17th OFDM symbol arrives, the average no longer takes into account the value of the first symbol, and so on. Even if the average of the 16 samples is not large enough to get to zero, the resulting value is still small enough to be written off. Then n d can be obtained by substracting (7) and (8): Additionally, the value of τ should be calculated considering the deterministic noise. Subtracting the value of the angle on two different subcarriers following 5, we obtain: Thus, (11) is a better way to estimate the time delay that generates a phase shift in the frequency domain at the receiver due to the mismatch of the clocks. In other words, it achieves the same objective as (4) but eliminates the impact of deterministic noise in the final time delay estimation.
In addition, to better understand the impact of each of the three different factors on the final angle, each one is represented in Fig. 5. Where + corresponds to the original position of the symbol, in this case, for the 2nd and 6th subcarrier. The represents the shift due to the deterministic noise, which is equal for both symbols. The o represents the rotation due to the SFO for an offset from 1 to 7. Note that the non-deterministic noise has an impact not only on the angle of the symbol but also on its amplitude, different from the other two.
All OFDM symbols contained in the signal were superimposed to verify the results with the newly proposed solution. Fig. 6 shows the difference between the symbol distribution without correction and after applying the proposed equation (5). On the other hand, Fig. 7 shows the symbol distribution of the same OFDM symbols corrected with (4) and with (5). Regarding the performance of our proposed solution, the angular deviation of the 7th and 21st subcarriers with respect to the expected angle was measured and averaged for several OFDM packets. The results show that the average angular deviation of both was 0.11 rd with a standard deviation of 0.06 rd.
The estimation and correction of the angle in the hardware implementation (FPGA) adds a latency of 33 clock cycles.
A relevant discovery was that despite the deterministic noise being independent of the subcarrier number. It has a direct impact on the estimation of the rotation angle τ . That is because τ is not anymore just the received angle of the pilot compared with the desired one. Now it is the received angle minus the deterministic noise. This difference in the angle estimation will significantly affect more higher subcarriers, as it is multiplied by i. Fig. 7 shows the symbols corrected using our proposed After testing on MATLAB, the algorithm was implemented physically on the receiver FPGA. Table I shows the mean number of errors found in 256 different packages using the proposed angle correction. The errors are measured by comparing the TX data and the RX data stored in memory, which means that the resulting data pass through all the system stages (software, programable hardware, and hardware).
Each package contains 4096 Bytes (32768 bits). As the OFDM is coded with QPSK, the total OFDM symbols on each  package will be 686. The signals where captured from the experimental setup (Fig. 3) at different distances between the LED and the photodetector.
Additionally, in order to verify the system behavior with and without the suggested angle correction, some measurements were performed following Fig. 8. In this configuration, the receiver was moved outwards from the center of the beam. The errors were measured by comparing TX and RX data stored in memory, as was done in the previous experiment. In this case, the measure was performed at points where the light intensity significantly changed. In Fig. 9, it can be seen that the dispersion of the samples is higher. This is because the signal level is reduced, meaning less SNR, and therefore that the non-deterministic noise has more impact on the angle variation of the symbols. On the other hand, the number of errors increases faster and is always higher if the correction is performed without taking into account the deterministic noise. OFDM modulations have been used for a long time in guided and non-guided channels, but they can be adapted and optimized for VLC channels, as VLC is still in the way of standardization.
In this work, specifically on actual hardware implementation, we propose an improvement in the phase estimation and correction of the symbols at the receiver side. After experimenting with real data, we noticed that the symbols were affected by three major shifts. The first one, inherent to the channel and electronics, was the non-deterministic noise. The impact of this noise can be diminished, at least in the pilot subcarriers, by making a mobile average of the last 16 symbols.
The second one is a well-known problem of OFDM systems, as it is the SFO. This offset has a greater impact on higher subcarriers and is the only one of the three that depends on the subcarrier position. That said, the other two offsets impact the estimation of the SFO, and therefore the effect of this miscalculation will affect more the higher subcarriers (Fig. 7). To obtain the SFO, the pilot subcarriers are first promediated and then subtracted to avoid the deterministic noise in the equation. To estimate the SFO (11) must be applied.
The last one is the deterministic noise. This noise directly affects the phase of all subcarriers, which can be assumed to be equal for all the symbols. But, its estimation also affects the correct calculation of the SFO, as explained before. In this way, the higher the deterministic noise in the channel more important its correction becomes. This angle shift can be calculated with any two subcarriers, but as the pilots contain known data, it is easier to compare with the transmitted angle.
Finally, our proposed equation to estimate the total angle shift at the receiver is the sum of these three offsets as shown in (5).
Experiments were run out in setups with high and low deterministic noise. The results show that the addition of the deterministic noise to the angle correction does not negatively impact the channels without or with a small amount of this noise. But, when the channel has a significant amount of deterministic noise, the impact of not taking it into account would be notable and, in higher amounts on higher subcarriers. From Fig. 9, it can be seen that when the SNR goes down, the correct estimation of the deterministic noise and the proposed τ calculation have a higher impact on the number of errors. Another interesting fact is that when there is high light intensity in the receptor, the two approaches have similar behavior. But, when comparing the classical approach with the proposed one in low signal conditions, the BER in the correction without the deterministic noise doubles the value obtained on the one with it. To have a better understanding, the BER with our proposed solution is 0.028%, compared with the BER of the classical solution (0.058%) at 18.28 cm of the center of the light source.