# HCL Control Strategy for an Adaptive Roadway Lighting Distribution
## 2 Materials and Methods
### Geometric Analysis of Optical Refraction Surface in Roadway Lighting  
According to the law of refraction, which is generally known as Snell's law, the optical axis Z is use as a reference for 0\({}^{\circ}\) as shown in Figure 6, the ideal light source O is refracted to direction B at \(\theta_{b}\) from a certain incidence angle A which is \(\theta_{a}\). \(\theta_{1}\) and \(\theta_{2}\) are the incident light and the outgoing light from the normal line \(L_{N}\) of point P, respectively. \(\theta_{N}\) is the included angle between the normal line \(L_{N}\) at point P and the horizontal line. Finally, we can obtain the slope of the tangent line \(M_{P}\) at point P and the tangent line equation of the reflecting surface \(L_{\text{C}}\) by the mathematical relationships as follows:  
\[\theta_{a}^{\prime}-\theta_{1}+\theta_{b}+\theta_{2}=\frac{\pi}{2}\ \Rightarrow\ \theta_{2}=\frac{\pi}{2}-[(\theta_{a}^{\prime}+\theta_{b})-\theta_{1}] \tag{6}\]  
The relationship between the tangent line \(L_{\text{C}}\) at point P and the horizontal line angle \(\theta_{\text{C}}\) is as follows:  
\[\theta_{c}=\theta_{a}+\theta_{1}=\frac{\pi}{2}-\theta_{a}^{\prime}+\theta_{1} =\theta_{b}+\theta_{2} \tag{7}\]  
Based on [PERSON]'s law, the relation of \(\theta_{1}\) and \(\theta_{2}\) is as shown in Formula (8). This study uses PMMA and PC for lens design, and the refractive index of medium \(n_{1}\) is 1.49 and 1.59 respectively; the second medium \(n_{2}\) is air, whose refractive index is 1. Formula (6) is inserted into Formula (7) to obtain the complete relation:  
\[\begin{array}{l}n_{1}\sin\theta_{1}=n_{2}\sin\theta_{2}\\ =\sin\bigl{\{}\frac{\pi}{2}-[(\theta_{a}^{\prime}+\theta_{b})-\theta_{1}] \bigr{\}}\\ =\cos[(\theta_{a}^{\prime}+\theta_{b})-\theta_{1}]\\ =\cos(\theta_{a}^{\prime}+\theta_{b})\cos\theta_{1}+\sin(\theta_{a}^{\prime}+ \theta_{b})\sin\theta_{1}\end{array} \tag{8}\]  
After dividing Formula (8) by \(\cos\theta_{1}\), we obtain Formula (9) and substitute it into Formula (7) to obtain angle \(\theta_{c}\), which is the angle between the tangent line at point P and horizontal line \(L_{\text{C}}\) as shown in Formula (10):  
Figure 6: Geometric analysis of the curved surface refraction.  
\[\theta_{1}=\tan^{-1}[\frac{\cos(\theta_{a}^{\prime}+\theta_{b})}{n_{1}-\sin( \theta_{a}^{\prime}+\theta_{b})}] \tag{9}\]  
\[\theta_{c}=\theta_{a}+\theta_{1}=\theta_{a}+\tan^{-1}[\frac{\cos(\theta_{a}^{ \prime}+\theta_{b})}{n_{1}-\sin(\theta_{a}^{\prime}+\theta_{b})}] \tag{10}\]  
We can obtain the slope of the tangent line \(M_{p}\) at point P from Formula (10).  
\[M_{p}=-\tan\theta_{c}=-\tan\biggl{\{}\theta_{a}+\tan^{-1}[\frac{\cos(\theta_{ a}^{\prime}+\theta_{b})}{n_{1}-\sin(\theta_{a}^{\prime}+\theta_{b})}] \biggr{\}} \tag{11}\]  
The tangent equation at point P can be obtained from \(M_{p}\) Formula (11).  
\[\begin{array}{l}y-y_{p}=M_{p}(x-x_{p})\\ \Rightarrow y=M_{p}(x-x_{p})+y_{p}\\ \qquad=-\tan\Bigl{\{}\theta_{a}+\tan^{-1}[\frac{\cos(\theta_{a}^{\prime}+ \theta_{b})}{n_{1}-\sin(\theta_{a}^{\prime}+\theta_{b})}]\Bigr{\}}\times(x-x _{p})+y_{p}\end{array} \tag{12}\]