# Total Internal Reflection Lens for Optical Wireless Receivers
## 2 Concept, Design, and Assembly
### Geometrical Construction  
Figure 2 illustrates the geometrical surface construction. The lens is designed by using the edge-ray principle and subsequent optimization of the angle of incidence \(\theta_{1}=[\theta_{a}{}^{\prime},\theta_{a}]\) to flatten \(g_{\rm o}\) within the FOV. Therefore, \(\theta_{a}\) denotes the acceptance angle and it holds \(\theta_{a}{}^{\prime}<\theta_{a}\). The construction procedure takes the flat PD surface into account. The interface is modeled with the parametric curve \(\mathbf{C}(x)\). For this work, the curve is a simple straight line, where the parameter \(x\) refers to the \(x\)-coordinate. In general, the shape might be more complex and an arbitrary parameter might be chosen.  
Initially, the point \(\mathbf{P}_{1,j}^{0}\) is defined. The input vector \(\mathbf{v}_{1,j}\) is derived from the angle of incidence \(\theta_{i}\). The vector \(\mathbf{v}_{1,j}^{\prime}\) is calculated from \(\mathbf{v}_{1,j}\) by the taking the refraction at the flat top surface into account. The point \(\mathbf{P}_{1,j}\) is given by the intersection of \(\mathbf{v}_{1,j}^{\prime}\) and a tangential vector \(\mathbf{t}_{1,j-1}\). The tangential vector \(\mathbf{t}_{1,j-1}\) is derived by rotating the normal \(\mathbf{n}_{1,j-1}\) of the previous point \(\mathbf{P}_{1,j-1}\) around the y-axis by \(\pi/2\). In general, it is not possible to directly calculate the normal vector \(\mathbf{n}_{1,j}\), because the ray does not target the final point \(\mathbf{P}_{\rm t}\) directly. It is refracted at the PD package top at an unknown point \(\mathbf{P}_{1,j}^{\rm PD}\). The output vector \(\mathbf{o}_{1,j}\) is unknown as well since it depends on \(\mathbf{P}_{1,j}^{\rm PD}\). The point \(\mathbf{P}_{1,j}^{\rm PD}\) is determined as follows: We define the law of refraction at the point \(\mathbf{P}_{1,j}^{\rm PD}\) according to Equation (2), where \(\angle\) describes the angle between the vectors in the brackets. We assume \(\mathbf{n}_{1}=1\) and \(\mathbf{n}_{2}=1.5\).  
\[\mathbf{n}_{1}\sin\left(\angle\left(\mathbf{v}_{1,j}^{\prime\prime};\mathbf{n}_{1,j}^{\rm PD }\right)\right)=\mathbf{n}_{2}\sin\left(\angle\left(\mathbf{o}_{1,j};\mathbf{n}_{1,j}^{\rm PD }\right)\right) \tag{2}\]  
Figure 1: Cross-sectional concept render of the TIR lens and the PD. The colors indicate angles of incidence (blue: \(-5^{\circ}\), green: \(0^{\circ}\), orange: \(+5^{\circ}\)). Only rays that hit the PD chip are shown.  
Figure 2: Geometrical construction of the lens surface.  
The problem is solved by expressing all variables as a function of \(\mathbf{C}(x)\) and bringing the equation into the form \(\mathbf{C}(x)=0\). In the next step, the Newton algorithm is applied to extract the coordinate \(x_{j}\). The point \(\mathbf{P}_{1,j}^{\text{PD}}\) corresponds to \(\mathbf{C}\big{(}x_{j}\big{)}\). The vectors \(\mathbf{o}_{1,j}\) and \(\mathbf{v}_{1,j}^{\prime\prime}\) are given by \(\mathbf{o}_{1,j}=\mathbf{P}_{\text{t}}-\mathbf{C}(x_{j})\) and \(v_{1,j}^{\prime\prime}=\mathbf{C}\big{(}x_{j}\big{)}-\mathbf{P}_{1,j}\). The normal vector \(\mathbf{n}_{1,j}^{\text{PD}}\) is the rotated tangential vector of the function \(\mathbf{C}\big{(}x=x_{j}\big{)}\) according to Equation (3).  
\[\mathbf{n}_{1,j}^{\text{PD}}=\mathbf{R}_{\text{a}}\Big{(}\frac{\pi}{2}\Big{)}\cdot\frac {\partial\mathbf{C}\big{(}x=x_{j}\big{)}}{\partial x} \tag{3}\]  
Thus, \(\mathbf{R}_{\text{a}}(\pi/2)\) denotes the rotation matrix. For a simple flat SMD package, \(\mathbf{n}_{1,j}^{\text{PD}}\) is parallel to the z-axis. After \(\mathbf{P}_{1,j}^{\text{PD}}\) is known, \(v_{1,j}^{\prime\prime}\) and \(\mathbf{o}_{1,j}\) are calculated. By using this procedure, a 2D curve of the lens is generated. The number of calculated points per curve \(N\) is 1200. The calculated curves are interpolated using cubic non-uniform rational basis splines (NURBS) [32]. A 3D representation is generated by rotating the curve around the z-axis. A render image of the design is shown in Figure 1.