Signal Detection and Identification in an Optical Camera Communication System in Moving State

Visible Light Communication (VLC) technology uses light-emitting diodes (LEDs) as a signal transmitting source to simultaneously realize lighting and data communication, and the spectrum resources are abundant. Since the visible light communication system with a photodiode (PD) as the receiver has some weaknesses, such as narrow field of view (FOV), inaccurate alignment in moving state, and inadaptability for indoor communication environments, an optical camera communication (OCC) system based on target detection algorithm is proposed in this paper. The system applies a LED array mounted on a moving AGV (automated guided vehicle) as the signal transmitter and a CCD camera as the receiver to realize data transmission in an outdoor environment. In this paper, a VLC MIMO channel model is constructed to verify that simultaneous communication of multiple LEDs through MIMO channels can effectively reduce bit error rate. The designed OCC system utilizes an image processing algorithm based on target detection to detect and identify light signals, realizing relatively stable and reliable communication in the state of motion. The distance from the signal transmitter to the receiver ranges from 6m to 14m.


Introduction
As wireless communication has been widely applied, there is a potential shortage in radio frequency resources to meet the current need. Visible light generally has a wavelength of 400nm-780nm and a frequency of 380THz-750THz. With abundant spectrum resource and unregulated frequency bands, visible light communication has great development potential. High-intensity light emitting diodes (LEDs) are high in luminous efficiency and strong in energy conservation and durability, and are thus gradually replacing conventional incandescent light bulbs in a wide range of fields, such as indoor and outdoor lighting, traffic lights, automobile lights and sign boards. The popularization and wide application of LED drives the development of visible light communication, which fosters both illumination and communication [1][2] [3] .
Visible light communication (VLC), a wireless communication technology, does not require transmission media such as optical fiber or physical lines. It utilizes visible light to transmit information and data, instead of occupying radio frequency resources. Communication systems based on visible light commonly use LEDs with high response sensitivity as the transmitter signal source, and loads signals on the LED-driven circuit through intensity modulation [4] . Zhang Long et al. proposed a VLC system utilizing one single RGB LED as signal source [5] , which receives optical signals by capitalizing on a CMOS rolling shutter camera. The receiver of a VLC system is generally a photodiode (PD) which converts optical signals into electrical ones and realizes point-to-point wireless communication. Such systems tend to require pretty high power for long-distance communication, and are thus more  [6] . Liu Ying et al. analyzed the application of orthogonal frequency division multiplexing (OFDM) and carrierless amplitude phase (CAP) modulation in VLC systems [7] , which can effectively improve BER performance and increase spectral efficiency.
However, VLC systems with PD as receiver have a very narrow field of view (FOV) and are susceptible to the disturbance of other optical signals. The transmitter and receiver need to be accurately aligned, and thus such systems are not ideal for mobile environments. To increase the signal-to-noise ratio of VLC and broaden the receiver's FOV in mobile environment, some researchers from home and abroad considered optical camera communication (OCC) systems using imaging sensor as the receiver, based on the technology of multiple-input-multiple-output (MIMO) wireless communication [8] . OCC technology inherits the advantages of VLC and digital image processing technology, realizing a pixelated MIMO VLC model that filters out noise through optical imaging of the image sensor [9] .
The application of MIMO technology realizes simultaneous transmitting and receiving of parallel multi-channel signals, which effectively enhances the utilization of the light source and reduces fading channels through spatial multiplexing. Since a single LED's power is limited and illumination intensity generally ranges from 300-1,500 LM, the communication distance is greatly limited. By forming a visible light MIMO system deploying multiple LEDs to create an environment with high signal-to-noise ratio, the transmission distance is increased. An OCC system may utilize several LED arrays as the signal source to transmit signals parallelly, capture optical signals through pixels on the image sensor, and realize the diversity reception of source information over MIMO system, thus identifying signal sources at different locations in a space [10] . In this paper, we discuss simulation results of MIMO VLC channels and study how MIMO VLC systems based on imaging sensor as receiver realize simultaneous transmission and reception of multi-channel signals. To filter background noise while the transmitter is in the state of motion and identify effective optical signals from the LED light source, a signal detection model based on adaptive target detection algorithm for OCC systems is proposed. The designed OCC system applies LED array as transmitter and Basler CCD camera as receiver to identify and decode optical signals in moving state.

The Model of OCC System and LED Light Intensity Distribution
2.1. OCC system architecture The designed OCC system uses a LED array as transmitter and a CCD camera as receiver. The architecture framework is presented in Figure 1. First, raw binary data is input into the microcomputer of the transmitting end and turned into parallel multi-channel signals through serial-parallel conversion. Then, after coded modulation, the signals are loaded on a LED-driven circuit and gated to LEDs at corresponding locations in the array through electrical addressing. Lighted LEDs, as the light source, transmits optical signals to free-space optical channels. Through on-off keying (OOK) modulation, the luminous intensity of LEDs changes at high speed to transmit information. Since light travels in straight line (rectilinear propagation of light), the multiple parallel light paths going from the LED array can be deemed as MIMO channels. The imaging sensor at the receiving end captures optical signals through densely-distributed PDs on it and outputs current. The current intensity changes in line with luminous intensity [11] . The system's receiver is acA1300-30gc Basler ace camera composed of lens and imaging sensor chip. The control chip of the camera system uses control signal circuit in the photosensitive component to control the current generated from PDs. The signals are then output through the current transmission circuit. CCD collects all electrical signals generated from imaging and exports them to the amplifier. The obtained signals will be stored in the imaging plane in the form of pixel gray value. As shown in Figure 2, the light emitted from a LED is projected through the lens on an imaging plane composed of pixel blocks. The information contained in one obtained frame of image includes the object's spatial information and its luminous intensity in the space. The size of a LED projection on the imaging plane depends on the number of pixels. Each lighted LED at least covers one pixel.

Figure 2. Projection of a LED on the imaging plane
When the transmitter is a LED array composed of multiple LEDs, the lighted LEDs and the camera's imaging plane form multiple independent free-space communication links, which determine that every object in the field of view shall occupy a certain pixel region in the imaging plane, and the area covered by pixels and spatial coordinates can be identified through image processing. In this way, even if the transmitter moves at a certain speed against the receiver, the light source still can be detected and located in the imaging plane. Then, upon obtaining coordinates of the light source, image information can be identified and decoded.

Line-of-sight (LOS) links of VLC systems
If we use a Lambertian model to describe the LED as transmitter, it is a Lambert radiator, whose luminous intensity's spatial distribution accords with Lambert's cosine law. A typical point-to-point VLC link is shown in Figure 3. There are two ways for optical signals in VLC systems to travel from the light source to the receiver, i.e. line-of-sight propagation (LOS) and non line-of-sight propagation (NLOS).

Figure 3. LOS link in visible light communication
As the OCC system uses imaging sensor as receiver and the imaging only considers available signal sources in the field of view, we only consider LOS links in the OCC system. The transmission function of optical signals emitted from the LED light source and going through LOS channels is: where A refers to the effective receiving area of the photoelectric detector of the receiver, d is the distance from the transmitter to receiver, and ( ) t R  is the radiant intensity of LED, which is: where m is Lambertian order ( 1/2 ln 2 ln(cos ) m    ), and 1/2  refers to half-power angle. The luminous pattern of the OCC system's light source, i.e. a LED array composed of multiple LEDs, is shown in Figure 4. After the imaging sensor captures image signals, the distribution of luminous intensities of corresponding LEDs in the imaging plane can be obtained，which is shown in Figure 5.

VLC MIMO channel model
Since one single LED's power is limited and cannot support long-distance data transmission, our OCC system uses several LEDs at the transmitting end. Each LED is connected to the receiver through an independent LOS link, and thus the LED array is connected to the imaging sensor's plane through multiple links, as shown in Figure 6. These independent channel links can be regarded as a certain VLC MIMO system. MIMO is a wireless communication technology that uses multiple antennas at both the transmitting and receiving ends. VLC MIMO system splits data up into several segments and transmits different data through different antennas independently. At the same time, the receiving end combines mixed information from diverse channels, distinguishes data from parallel data streams and restores raw information by utilizing the different fading characteristics of spatial channels [12] , thus acquiring higher data transmission rate while consuming the same amount of frequency resource. The VLC MIMO channel model constructed through experiment is illustrated in Figure 6. We suppose there are 8 LEDs in the LED array as transmitter of the VLC MIMO system and 8 PDs at the receiving end. The LED array and the PD array at the receiving end are parallel. Every link from LED to PD is an independent channel. In such a system, ( ) y t is the signal matrix at the receiving end: where r is the opto-electronic conversion factor of light sensors on the imaging sensor at the receiving end; ij H is the transmission coefficient of the subchannel from LED j to PD i . All subchannels are independently and identically distributed.
where  refers to the emission angel of the LED light source,  is the incidence angle of PD receiving optical signal, and ( ) g  refers to the gain of light passing through the imaging lens. ij H = 0 when the light source is out of the field of view. We use MATLAB to simulate communication systems with 2*2 and 2*1 antenna structures. For different antenna structures, we introduce convolutional error correcting code to the transmitting end for channel coding. The signals pass through additive white noise channels that subject to Gaussian distribution and then go to the receiver for maximum likelihood judgment and Viterbi decoding. Data is then output from the receiver. Our simulation results are shown in Figure 7. The 2Tx-2Rx configuration is slightly lower than the 2Tx-1Rx configuration in bit error rate when the signal-to-noise ratio (SNR) is approximately 5dB. However, when SNR is above 10dB, 2Tx-2Rx system that applies channel coding has a significantly lower bit error rate than other systems. MIMO uses multiple antennas to transmit information simultaneously, which realizes space multiplexing and space-diversity reception, effectively enhances channel reliability and decreases bit error rate.

Synchronization between transmitter and receiver
To guarantee reliable communication, the transmitter and receiver need to be synchronized in a VLC system. The data frame the transmitter sends shall contain one set of synchronized signals, which is a unique bit combination that is easy to be identified and decoded. In the designed OCC system, the LED array at the transmitting end flickers in a special way, and the signal is marked as a flag frame. To detect and locate the LED zone in an OCC system based on LED array, the flag frame representing the beginning of signal reception can be set as the LED array with four corners lit up, as a mark symbol. This pattern (with four corners lit up) doesn't serve the function of data transmission, while the other LEDs transmit information through being turned on and off. Since OOK modulation is adopted at the transmitting end, a LED turned on transmits the code element "1", and a LED turned off transmits "0". Serial input of a data stream composed of "0" and "1" at the input end, after finishing serial-parallel conversion and passing a LED-driven circuit, result in corresponding Ons and Offs of LEDs in the array. The receiving end verifies the synchronization between transmitter and receiver through detecting the flag frame periodically.

Quick detection and locating of the LED zone
To simulate real communication conditions, the transmitter and receiver can either be fixed or moving independently. Thus, the imaging sensor at the receiving end shall be able to identify the LED array's location quickly from certain frames and keep locating the array in subsequent frames while continuously decoding the transmitted information.
The method to locate the LED array is to add a special, easily recognizable image sequence segment into the image sequence of the LED array transmitted from the signal source. As shown in Figure 8, by using the aforementioned flag frame, i.e. four lit-up corners, the LED array zone can be accurately located. After synchronizing the transmitter and receiver, the OCC system with CCD camera as receiver will pre-process loaded image information in two steps, histogram equalization and adaptive threshold segmentation. The obtained image information will only be saved. Then, through recording multiple continuous frames and detecting necessary optical signals in background noise, the system will locate the LED array zone in the imaging plane and identify and decode LED image information through the support of target detection algorithm. The receiver works as follows: a) Image preprocessing. b) LED array detection and locating. c) LED array signal extraction. d) Judgment (whether the image frame is tilted). e) LED signal decoding.  Figure 9. Signal detection and identification

Inter-frame difference algorithm based on adaptive threshold segmentation
Since the receiver of the OCC system receives continuous frames, there are relative changes in the position of a moving target object in consecutive frames, and in the luminous state of LEDs. Inter-frame difference algorithm is used in target objection. It is applied to obtain the profile of a moving target through computing the difference between consecutive frames in a video image sequence. In an OCC system, inter-frame difference algorithm can be applied to perfectly detect the moving target through locating changes in the LED array's relative position in different frames, thus detecting and identifying optical signals.
The inter-frame or three-frame difference approach computes the difference between two or three frames. By subtracting the same information while saving different information, the difference between two images can be revealed. The inter-frame difference approach works as follows: First, a differential image is calculated from two consecutive gray images by subtracting gray values of the two frames. Then, binarize the differential image and set a binarization threshold [13] . If the subtracted result is very low in value, the differential image can be deemed as the background. If the value is high, the differential area can be regarded as the transmitter (LED array) in the state of motion, and needs to be marked. The location of the LED array can be identified from analyzing the marked pixel zones.
By applying the inter-frame difference approach, compute the difference between Image k (P k ) and Image k-1 (P k-1 ) and obtain a binary image. T refers to the preset threshold, which depends on the distribution of grey values in the image. By dividing images into two categories by applying T, images with grey value higher than T are regarded as foreground (i.e. the target LED array), while those with grey value lower than T are background. If T is set too high, the detected target may be hollow, and the target profile may be incomplete. If T is too low, there will be pretty much noise information. Since the illumination of adjacent LEDs in the LED array will result in overlayed luminous intensities, using single threshold method to process images with unevenly distributed illumination will result in relatively huge error. Thus, we apply adaptive threshold approach to determine the T value in our OCC system: Figure 10. AGV-mounted transmitter By conducting morphological operations such as logic and operation, and dilation and erosion, over the obtained two difference results, the target image is acquired as shown in Figure 11. The LED array can be extracted from the background according to coordinates L X , R X , T X and B X . Figure 11. Detected LED array

Image information decoding
A single LED may cover multiple pixels in the imaging plane of the imaging sensor. Through applying the approach of connected components labeling, connected components labelled as finished are analyzed to identify the lighted LED and corresponding coordinates on the imaging plane are output. By going over all pixel points, adjacent pixels with the same value are labelled as a set. Equivalence pairs of the same set are then be labelled as a connected component. Repeat the process until all equivalence pairs are labelled as finished, i.e. all marks of pixel points are decoded. By using connected components labeling, the detected LED zone is decoded and the following binary data matrix is obtained. We can see that the results shown in Figure 12 are exactly the same as the raw data sent by the transmitter, as presented in Figure 4. According to experiment results, when the transmitter of our OCC system is moving at the speed of 25 km/s, the bit error rate is -4 6.5 10  , and the distance from the transmitter to the receiver ranges from 6m to 14m.

Conclusion
Considering the huge application prospects of visible light, the paper proposes an OCC system based on MIMO channel model, which expands the field of view and meets the requirement of relatively longdistance outdoor communication. Our OCC system based on LED array and CCD camera utilizes image algorithms related to target detection to code and decode optical signals and realize data transmission in the state of motion. In the future, more state-of-the-art coded modulation techniques and target detection approaches based on deep learning algorithms may be utilized to further enhance the speed of visible light communication.