# A Quadrilateral Geometry Classification Method and Device for Femtocell Positioning Networks
## 3 Principle of NMLP Geometry Classifier
The weight matrices are updated by:  
\[\mathbf{W}_{nm}^{(s)}(q+1)=\mathbf{W}_{nm}^{(s)}(q)+\mu^{(s)}(q)\delta_{n}^{(s)}(q) \cdot x_{out,n}^{(s-1)}(q) \tag{11}\]  
where the learning rate is given by:  
\[\mu^{(v)}=\mu_{0}/(1+(k/t))\;(100<t<500) \tag{12}\]  
For the hidden layer:  
\[\overset{\rightarrow}{\delta_{j}^{(s)}(q)}=(\overset{n_{s+1}}{\underset{h= 1}{\overset{\rightarrow}{\sum}}}\delta_{h}^{(s+1)}(q)\cdot w_{hj}^{(s+1)}(q)) g(v_{j}^{(s)}(q)) \tag{13}\]  
For the output layer:  
\[\overset{\rightarrow}{\delta_{j}^{(s)}(q)}=(d_{output}^{\overset{\rightarrow} {\underset{\rightarrow}{\sum}}}(q)-x_{out,j}^{(s)}(q))g(v_{j}^{(s)}(q)) \tag{14}\]  
During the training, the network weights are adjusted in order to reduce the mean square error (MSE) obtained by [12]  
\[\text{MSE}=\frac{\overset{m_{l}}{\underset{q=1}{\overset{\rightarrow}{\sum }}}(s_{iq}-d_{iq})^{2}}{m_{l}} \tag{15}\]  
The performance of the NMLP geometry classifier will be evaluated in terms of the percentages for correct classification. It is defined on the difference between the desired output and the estimated output of the NMLP geometry classifier. The classification accuracy is defined as [12]:  
\[\text{classification accuracy}=\frac{N_{c}}{P}\times 100\% \tag{16}\]  
where \(N_{c}\) is the total number of correct classifications and \(P\) is the total number of four FeNBs within the sphere. The flowchart of the IGT algorithm is shown in Figure 3, which is used to generate the training data for the NMLP geometry classifier. As shown in Figure 3, the IGT algorithm comprises five steps. In the first step, four FeNBs are chosen such that the distance between each pair of FeNBs is less than the pre-specified diameter of a sphere (expressed in meters). In other words, four FeNBs are selected such that the following equations are satisfied:  
\[ \begin{array}{l}\sqrt{\left(x_{i}-x_{0}\right)^{2}+\left(y_{i}-y_{0}\right) ^{2}+\left(z_{i}-z_{0}\right)^{2}}\leq 2R\;,\;i=1,2,3\\ \sqrt{\left(x_{i}-x_{i+1}\right)^{2}+\left(y_{i}-y_{i+1}\right)^{2}+\left(z_{i }-z_{i+1}\right)^{2}}\leq 2R\;,\;i=1,2\\ \sqrt{\left(x_{i}-x_{i+2}\right)^{2}+\left(y_{i}-y_{i+2}\right)^{2}+\left(z_{i }-z_{i+2}\right)^{2}}\leq 2R\;,\;i=1\end{array}  \tag{17}\]  
where \((x_{i},y_{i},z_{i})^{\mathrm{T}}i=0,1,2,3\) are the coordinates of the four FeNBs; \(R\) is the sphere radius; and \(T\) denotes the transpose of the matrix. In the second step, the selected set of FeNBs is updated as required, to ensure that all four FeNBs are located on the same plane. Note that the sufficient condition for such a case occurs when the parallelepiped volume constructed by the three vectors \(s_{0}^{\rightarrow}s_{1},s_{0}^{\rightarrow}s_{2},s_{0}^{\rightarrow}s_{3}\) is equal to zero. In other words:  
\[\left\| \begin{array}{ccc}x_{1}-x_{0}&y_{1}-y_{0}&z_{1}-z_{0}\\ x_{2}-x_{0}&y_{2}-y_{0}&z_{2}-z_{0}\\ x_{3}-x_{0}&y_{3}-y_{0}&z_{3}-z_{0}\end{array} \right\|=0 \tag{18}\]  
where the FeNB located at coordinates \(\left(x_{0},y_{0},z_{0}\right)^{\text{T}}\) is chosen as the reference station. In the third step, the geometry disposition of the four FeNBs is evaluated to ensure that the FeNBs form either a square or a lozenge shape. In this case, the sufficient condition is taken as two of the vectors having a perpendicular orientation to one another. In other words, the inner product of the two vectors is equal to zero, i.e. :  
\[\underset{s_{0}}{\longrightarrow}s_{1}s_{3}=0 \tag{19}\]  
In the fourth step, a check is made to confirm that the four FeNBs are not located on a straight-line. If four FeNBs are located on a straight-line, this increases the radius, and if not, then the shape is an IQ. In general, two vectors are parallel if their outer product is equal to zero. Thus, the four FeNBs  
Figure 3: IGT procedure for generating the training data. are not located on a straight-line if \(\mathrm{A}\cup\mathrm{B}\cup\mathrm{C}\) is valid, where \(\mathrm{A}\), \(\mathrm{B}\), and \(\mathrm{C}\) are defined, respectively, as follows:  
\[