Optimizing the light source layout of the indoor visible light communication system

Aiming at the problem of uneven illuminance distribution in traditional indoor optical communication systems, this paper proposes a square + ellipse layout, using simulated annealing particle swarm algorithm to optimize the spacing of LED light sources, and optimize the uniformity of system illuminance and signal-to-noise ratio. The simulation results show that the optimized square + ellipse layout illumination ranges from 359.25 lx to 451.05 lx, and the mean square error reaches 12.66 lx. Signal noise ratio is between 18.54 dB and 20.75 dB, and the mean square error is 0.39 dB. Compared with the traditional square and elliptical layout, the illumination performance and communication performance are improved clearly, which provides a new reference scheme for indoor light source layout.

of the bottom of the rectangle as the origin. The x -axis and y -axis are parallel to the two bottom edges of the room respectively, and the z -axis is perpendicular to the ground. The light source is placed at the top of the room.

Indoor optical communication links are divided into lineof-sight links(LOS) and non -line -of -sight links(NLOS).
Studies show that in the receiving plane, direct received power accounts for 93.03 % of the total received power, and reflected light for the first time accounts for 5.53 % of the total received power. The proportion of two or more reflections in the total received power is very small, so this paper only studies the impulse response of direct and the first time reflection. The emission model of the ideal LED light source follows the Lambert distribution model, and the radiation distribution function of the light source can be expressed as θ is radiation angle of LED light source, and m is the number of radiation patterns of the light source.
For the LOS link, the illuminance formula of the receiver plane can be expressed as I 0 is the intensity of light when irradiated vertically, θ is LED radiation angle, Ψ is the receiving angle of receiver, and D is the distance between the receiver and the light source.
For NLOS links, this article proposes that the four walls of the room are considered four mirrors in this article. The four dotted rectangles as shown in Figure 2 are the images of the original rectangle reflected by four mirrors. The illuminance of the source array in the newly generated rectangle multiplied by the reflectance of the original rectangular receiver is equal to the primary reflectance of the original source array. The illuminance of the NLOS can be expressed by the following formula.
In the above formula, 0.8 is the reflectivity of the wall, so the total illuminance of the receiver plane can be expressed as LED light source is transmitted to the receiving plane through the channel, and the DC gain of the channel can be expressed as , ψ > ψ c (5) A rx is the area of the receiving detector, R 0 (θ) is LED radiation distribution function, D is the distance between the detector and the light source, T s (ψ) is the optical filter gain, g s (ψ) is the concentrator gain, and ψ is the field of view of the receiver.
The signal power received at a certain point on the receiving plane is equal to the sum of the received power of all LED arrays at that point, which can be expressed as P ti and H i (0) represent the transmit power of the i-th LED and the DC gain of the channel respectively, and n is the number of LEDs.

A. ALGORITHM OPTIMIZATION
The advantage of the PSO algorithm lies in its fast convergence speed and simple algorithm [11]. However, PSO algorithm also has the problem of weak search ability and easy to fall into local optimal solution. In order to solve this problem [12]- [14], this paper improves the algorithm from two aspects.
(1) Inertia factor The inertia factor affects the global search ability and local search ability of the algorithm. As the iteration progresses, the particles need stronger local search ability, so the inertia factor should be gradually reduced. This article proposes an improved method for the inertia factor as In the above formula, w(k) is the improved inertia factor, w max is the maximum inertia factor, w min is the minimum inertia factor, k is the current iteration number, T max is the maximum iteration number. w max and w min take values 0.4 and 0.9 respectively, and T max takes value 200.
(2) Learning factor The learning factor, c 1 and c 2 , represents the individual learning ability and the group learning ability of the particle, as the iteration progresses, the particles need to gradually enhance the group learning ability and reduce the individual learning ability. On this basis, this article improves the learning factor.
In the above formula, c 1 (k) and c 2 (k) represent the improved individual learning factor and group learning factor respectively. c 1 and c 2 take values 0.4 and 0.9 respectively, are the value of the learning factor at the beginning of the algorithm iteration.

2) simulated annealing algorithm
This paper incorporates the annealing process in the simulated annealing algorithm into the particle swarm algorithm. When the initial temperature of the algorithm is high, simulated annealing particle swarm optimization makes population examples have larger probability to accept the optimal solution, so as to jump out of local optimal solution [15]. Specific algorithm process is shown in the Figure 3.

B. LIGHT SOURCE LAYOUT OPTIMIZATION
The traditional square layout and elliptical layout are shown in the follow figures and all light sources are distributed on the roof with a height of 3 meters. The square layout in Figure 4(a) consists of four 9 × 9 LED arrays, where x 1 is the distance between the edge of the LED array and the x-axis, y 1 is the distance between the edge of the LED array and the y-axis, d is the distance between the LEDs in the array. The elliptical layout in Figure 4(b) consists of 324 LED arrays evenly distributed on the ellipse, where x 2 is the length of the long axis of the ellipse and y 2 is the length of the short axis of the ellipse.  Use the algorithm mentioned above to optimize the square x1, x2, d and the ellipse x2, y2, and change the indoor light source layout by changing the overall shape of the square and ellipse, thereby optimizing the indoor illumination distribution.  As can be seen from Figure 5 although the traditional square layout and elliptical layout can meet the basic requirements of indoor communication and identification, there are still problems such as uneven illumination. In order to solve these problem, this paper proposes a square + ellipse layout. As shown in Figure 5, the model consists of four 7 × 7 square arrays and N equally spaced elliptical arrays.
In the Figure 6, x 1 , x 2 , y 1 , y 2 and d are the targets to be optimized. In order to ensure the uniformity of the system's illuminance and the reliability of communication, this paper chooses the combination of the mean square error of illuminance and the mean value of the signal-to-noise ratio f (x 1 , x 2 , y 1 , y 2 , d) as the optimal function. The function can be expressed as Where f 1 is the mean square error of illuminance, and f 2 is the mean value of the signal-to-noise ratio of the receiving plane. The value of α in this article is 10.
In order to study the influence of the number of LEDs in the ellipse on the performance of the system, this paper studies the illuminance and signal-to-noise ratio of the system when N is equal to 60-120. According to the data in Table 1 and Table 2, it can be indicated that as the number of LEDs in the ellipse increases, the   Figure 7 illustrates the relationship between the number of N and the objective function in the elliptical layout. It can be seen from the figure that as the number of LEDs in the elliptical layout increases, the value of the objective function first gradually decreases and then gradually grows until the objective function reaches its minimum value when N takes 90. So the value of N in this article is considered to be 90.

IV. SIMULATION EXPERIMENT AND DATA ANALYSIS
The light source luminescence mode used in this article is Lambertian luminescence mode, and the specific simulation parameters are listed in Table 3.
This article compares the two common layouts of square and elliptical with the layout proposed in this article. Since the system performance analysis of the indoor visible light communication system should consider not only the communication performance, but also the lighting performance of the system, this article analyzes the system under different layouts from the perspective of lighting and communication.  Figure 8 shows the overall illuminance image of the optimized square, elliptical, and square + ellipse layouts. It is apparent that the maximum illuminance of the square layout is 548.03 lx, the minimum is 375.86 lx, the mean square error is 31.32 lx, and the uniformity is 77.70 %. The maximum illuminance of the elliptical layout is 531.83 lx, the minimum is 361.05 lx, the mean square error is 35.46 lx, and the uniformity is 75.21 %. The maximum illuminance of the square + ellipse layout is 451.05 lx, the minimum is 359.25 lx, the mean square error is 12.66 lx,and the uniformity is 85.14 %. In order to verify the authenticity of the Matlab simulation results, this paper uses the Dialux software to analyze the above three the light source layout method which is simulated to obtain the real distribution of room illumination. Figure 9 shows the iso-illuminance diagram of the receiving plane 0.75 m away from the ground under the three light source layouts. It can be seen from the figure that the illuminance of the receiving plane is basically the same as the simulation result of Matlab.

A. LIGHTING PERFORMANCE ANALYSIS
The above-mentioned experimental data shows that the illuminance range of whether it is square, elliptical or square + ellipse layout ranges from 300 lx to 1500 lx [16], meeting the internationally regulated indoor lighting standards. But compared with the traditional square and elliptical layout, the layout model proposed in this paper reduces the dynamic range of illuminance and improves the uniformity of illuminance. Figure 10(a) is a traditional square layout receiving plane signal-to-noise ratio distribution.The signal-to-noise ratio ranges from 18.64 dB to 22.59 dB, and the mean square error is 0.80 dB. Figure 10(b) is the traditional elliptical layout receiving plane SNR distribution. The SNR ranges from 18.04 dB to 22.23 dB,and the mean square error is 0.93 dB. Figure 10(c) is the square + ellipse layout to receive a planar signal-to-noise ratio distribution image. The signalto-noise ratio ranges from 18.54 to 20.75 dB,and the mean square error is 0.39 dB.

B. COMMUNICATION PERFORMANCE ANALYSIS
It can be seen from the above that the new layout proposed in this article reduces the number of LEDs by 38, while reducing the fluctuation range of the signal-to-noise ratio, inter-symbol interference, system power consumption, and improving system reliability. Figure 11 is the iterative diagram of the particle swarm algorithm and the adaptive weight simulated annealing particle swarm algorithm proposed in this paper. It is worth nothing from the figure that the particle swarm algorithm reduces the fitness value to about 21 after about 10 iterations, but in the subsequent iteration process, it falls into the local optimal solution and cannot get to the global optimal solution. In contrast, the algorithm proposed in this paper finally finds the global optimal solution after multiple iterations. So it is evident that the improved algorithm can meet the requirements and help to obtain the optimal light source layout.

V. CONCLUSIONS
Aiming at the problem of uneven illuminance distribution in visible light communication systems, this paper proposes a square + ellipse layout to build a 6m×5m×3m room model. In terms of solving the optimal position, this paper uses the PSO algorithm to advance the process. Because the PSO algorithm has the problem of falling into the local optimal solution, the algorithm is improved from two aspects, and the combination of the mean square error of illuminance and the mean value of the signal-to-noise ratio is set as the fitness function. The optimal light source layout is found. The experimental results indicate that the optimized system illumination range is 359.25 -451.05 lx, and the mean square error reaches 12.66 lx. The signal-to-noise ratio ranges from 18.54 to 20.75 dB, and the mean square error is 0.39 dB. Compared with the traditional square layout and elliptical layout, while reducing 38 LED light sources, the uniformity of illumination and signal-to-noise ratio is optimized, which provides a new reference solution for the layout of indoor light sources.