# The Necessity of LED to Ambient Light Ratio Optimization for Vehicular Optical Camera Communication
## 4 Simulation
### Simulation Environment  
The simulation parameters are given in Table 1. The camera is assumed to have a 1 inch (\(13.2\times 8.8\) mm) sensor with Full-HD (\(1920\times 1080\) pixels) video recording resolution. The 18 mm lens focal length and 100 fps camera frame rate were assumed. The camera exposure time was assumed to be shorter than 1/1000 s to avoid a motion blur effect. A circular LED with a 3 cm diameter was assumed. The normalized LED interval was assumed to range from 0.5 to 2. It is important to note that the size of each individual LED is always fixed. Therefore, when the LED interval increases, the size of the entire LED panel would increases all together. The LED panel consist of \(8\times 8\) LEDs, and the LEDs were assumed to have dimming capability with their luminance ranging from 50 to 8000 cd/m\({}^{2}\). The LED surface reflectance ranges from 0.3 to 0.5. The ambient light illuminance was assumed to range from 50 to 16,000 lux, which corresponds to the changing lighting conditions on an illuminated street from night to a bright sunny day. The reflectance of the background was assumed to be 0.18. This is the average value of the reflectance of middle-grey objects. The testing communication distance ranged from 30 to 70 m. The average level of blooming and blurriness of the replicated images was assumed to be 1.5 pixels. In the simulation, clear weather conditions were assumed. The transmission coefficient at 70 m was assumed to be 0.9932. As the net data rate is calculated as the product of the number of transmitted bits per frame and the camera's frame rate, a fixed net data rate of 6.4 kbps was assumed. Figure 11: LED panel image replication. (**a**) Pinhole camera model to determine LED pixel coordinates. (**b**) LED blooming interference replication and gamma encoding. Because of the wide range of ambient light illuminance and LED luminance, the L2A ratio might change greatly. However, as mentioned earlier, for the sake of driving safety, the LED luminance was adjusted to guarantee the L2A ratio was always less than 4.0. ISO setting of the camera in the simulation is assumed to adjust automatically to ambient light. Firstly, the level of ambient light was measured using an in-camera spotlight meter. The camera exposure parameters required for yielding a middle-grey background in the image were then determined using the measured ambient light level. These camera exposure parameters include ISO speed \(S\), exposure time \(t\), and lens aperture \(N\). Because changing lens aperture leads to change in the image's depth of field, the lens aperture was fixed to maintain consistency in the performance of the VOCC system. The exposure time and ISO speed were increased to register more light in a dim environment, and were decreased in bright light. The range of the ISO was from 100 to 32,000. In the VOCC system, motion blur caused by the mobility of vehicles are usually not a big problem since vehicles moves in nearly the same direction. To further eliminate the motion blur problem, the longest exposure time was set to 1/1000 s.  
K-means clustering was used in the simulation to detect the transmitted bits. The BERs of the system with and without L2A ratio optimization were calculated, according to the different values of the system parameters, to evaluate the effectiveness of the optimization. In the simulation, the LED panels are assumed to be parallel to the camera. In practice, the non-parallel position between the LED panel and the camera might have negative impact on bit detection. The optimal L2A ratio for a specific non-parallel position might be slightly different to the that of the parallel case. However, vehicles are moving in parallel or near-parallel directions during most of their time on the road. The non-parallel situation only occurs in very short moments when the vehicle changes to other lane or turns to right or left.