## 4 Description of the Proposed System
The received signal in the photodetector after passing through the channel impulse response \(h(t)\) is defined as:  
\[s(t)=u(t)*h(t), \tag{10}\]  
where \(u(t)\) is the transmitted signal, \(h(t)\) is the channel impulse response, \(s(t)\) is the received signal by the photodetector, and \(*\) denotes the convolution operator. Further, the modulated signal by a carrier tone of the LED is described as:  
\[u(t)=\cos(2\pi ft). \tag{11}\]  
The received signal by the photodetector is the superposition of three transmitted signals after passing through the channel impulse response is given as:  
\[s_{p}(t)=u_{1}(t)*h_{1}(t)+u_{2}(t)*h_{2}(t)+u_{3}(t)*h_{3}(t). \tag{12}\]  
If the purpose of the system is the localization of \(n\) users, then it can be extended to three LEDs and \(n\) photodetectors. Therefore, the received signal in the place of each photodetector is the superposition of the three LED signals related to different channel impulse responses. The received signals of \(n\) photodetectors are described as:  
\[ \begin{array}{l}s_{p(1)}(t)=u_{1}(t)*h_{11}(t)+u_{2}(t)*h_{12}(t)+u_{3}(t)*h _{13}(t)\\ s_{p(2)}(t)=u_{1}(t)*h_{21}(t)+u_{2}(t)*h_{22}(t)+u_{3}(t)*h_{23}(t)\\....\\ s_{p(n)}(t)=u_{1}(t)*h_{n1}(t)+u_{2}(t)*h_{n2}(t)+u_{3}(t)*h_{n3}(t).\end{array}  \tag{13}\]  
In Equation (13), \(h_{n1}(t)\), \(h_{n2}(t)\) and \(h_{n3}(t)\) are the channel impulse responses between the \(n\)-th modulated signal and the first, second and third LED, respectively. Therefore, the signal \(s_{p(1)}(t)\) is considered as the input of the localization algorithm based on the previously defined scenario of three LEDs and one photodetector. Three band pass filters (BPF) are implemented to the signal \(s_{p(1)}(t)\) to separate the three carrier tones transmitted in different frequencies as follows:  
\[SR_{(1,i)}(t)=BPF_{(f_{i})}\left\{s_{p(1)}(t)\right\}\qquad for\quad(i=1,2,3), \tag{14}\]  
where \(SR_{(1,1)}(t)\), \(SR_{(1,2)}(t)\) and \(SR_{(1,3)}(t)\) are the filtered signals in frequencies \(f_{1}\), \(f_{2}\) and \(f_{3}\), respectively. The power of the received signals is calculated as follows:  
\[P_{(1,i)}(t)=\left|SR_{(1,i)}(t)\right|^{2}\qquad for\qquad(i=1,2,3). \tag{15}\]  
In Equation (15), \(P_{(1,i)}(t)\) is the calculated power in the location of the first photodetector for LED \(i\). The diameter of the sphere is estimated based on the calculated power of all three received carrier tones. The relation between the transmitted power (\(P_{t}(t)\)), the received power (\(P_{r}(t)\)), and the distance between transmitter and receiver (\(d\)) is determined as \(P_{r}(t)=\alpha\frac{P_{t}(t)}{d^{2}}\). The parameter \(\alpha\) is an adjustment factor estimated as \(\alpha=1.7\) based on different positions between the LED and photodetector for different distances. For example, in simulated conditions the LED is placed in a fixed position. Whereas the position of the photodetector changes; therefore, the received power varies according to its position. The parameter \(\alpha\) is determined by knowing the transmitted power, received power, and the distance between the transmitter and receiver. Hence, the diameter \(d\) is estimated based on the calculated power in the position of the photodetector, which is the diameter of the sphere centralized in the location of the LED. The parameter \(d\) should be calculated separately for all three LEDs to allow the plotting of the three spheres with the LEDs centering and their intersections, which is considered as the location of the photodetector. The most important challenge is the calculation of the intersection between the three spheres. This intersection can be find by writing the mathematical formulation of each sphere based on Cartesian coordinates \((x,y,z)\) and finding the intersection. The center of the (1 st) sphere is considered as the reference point, whereas the two other spheres are located in the same plane as the (1 st) sphere to have the coordinate \(z\) as \(z=0\). This is the basic assumption for the simplification of the localization process.