# Bearing Estimation for Indoor Localization Systems Using Planar Circular Photodiode Arrays
## 2 The Planar Circular Photodiode Array (PCPA)
### Fast Angle Estimation in the Frequency Domain  
To overcome the high computational complexity of the LS estimator, described in Section 2.3, a fast computation method will be proposed, where the angle estimation is made in the frequency domain.  
The following assumptions are made:  
* The relative sensitivity characteristics of the individual PCPA channels are almost identical. The universal normalized sensitivity characteristic is \(S_{rel}(\varphi)\), where \(S_{rel}\) is periodic with \(2\pi\);
* The sensitivity characteristics are even symmetrical.  
The justification of the assumptions can be seen in the measurements shown in Figure 3. Figure 3 shows the normalized sensitivity characteristics of 16 PCPA channels (these are in fact the radial sensitivities of the applied individual photodiodes), while Figure 3 shows their maximum difference between the measured normalized sensitivities. As the figure shows, the difference is indeed small; this is expected since the same type of photodiode was used in each channel. Figure 3 also shows that the sensitivity curve is indeed even symmetrical.  
Since the channels are rotated by \(\Delta\varphi=360/N\) (see Figure 2), the incoming light angle, coming from the same source, changes by \(\Delta\varphi\) at each channel. Thus the \(\Psi_{i}\) (\(i=0,1,\ldots,N-1\)) values, provided by a measurement, can be considered as equidistant samples of the \(S_{rel}(\varphi)\) sensitivity curve, as follows:  
\[\Psi_{i}=S_{rel}(\varphi+i\Delta\varphi). \tag{14}\]  
The measurement, modeled as a sampling process, is illustrated in Figure 4, for incoming angle values of \(\varphi=0\) and \(\varphi=-120\), for the photodiode shown in Figure 1. The \(N\)-element sample vector, as a function of \(\varphi\), is denoted by \(\Psi(\varphi)\). The angle estimation should determine the value of \(\varphi\), from the measured vector \(\Psi(\varphi)\).  
Figure 3: Sensitivity of 16 PCPA channels as a function of the direction of incoming light: (**a**) normalized sensitivity of all PCPA channels (each color shows a different channel), (**b**) maximum difference between the normalized channel sensitivities.  
The case when the light source is in direction zero, i.e., \(\varphi=0\), as in Figure 4a is examined. \(S(0)\) is the DFT of the sampled sensitivity curve \(\Psi(0)\), as follows:  
\[S(0)=DFT(\Psi(0)). \tag{15}\]  
Since \(\Psi(0)\) is even symmetric, \(S(0)\) is real, i.e., the angle of all harmonic components in \(S(0)\), including the fundamental harmonic \(S_{1}(0)\), is zero. In considering a case of an incoming light with arbitrary angle of \(\varphi\), where the DFT of \(\Psi(\varphi)\) is \(S(\varphi)\):  
\[S(\varphi)=DFT(\Psi(\varphi)) \tag{16}\]  
Using the shift property of the DFT, the value of the fundamental harmonic \(S_{1}(\varphi)\) of \(S(\varphi)\) can be expressed as follows:  
\[S_{1}(\varphi)=e^{-j\varphi}S_{1}(0). \tag{17}\]  
Since \(S_{1}(0)\) is real, the angle of \(S_{1}(\varphi)\) is  
\[\angle S_{1}(\varphi)=-\varphi. \tag{18}\]  
Thus, the frequency domain (FD) angle estimation can be carried out in the following way: First calculate the first harmonic component of the DFT of the measured vector \(\Psi\), as follows:  
\[S_{1}=\sum_{k=0}^{N-1}\Psi_{k}w^{k}. \tag{19}\]  
where  
\[w^{k}=e^{-j\frac{2\pi}{N}k} \tag{20}\]  
Then the angle estimate \(\phi\) is the following:  
\[\hat{\varphi}=-\angle S_{1}. \tag{21}\]  
The computational demand of the fast method is only approx. \(2N\) (real) operations, which is significantly smaller, than that of the least squares estimate.  
Figure 4: Measurement values, as samples of the sensitivity curve. (**a**) \(\varphi=0\), (**b**) \(\varphi=-120\). Blue line: continuous sensitivity curve, red dots: samples.