## 3 The LOBIN Prototype: A Practical Study Case
### System Validation and Tests
#### 3.2.2 Location Subsystem Tests  
The Location Subsystem tests were also divided into several stages. The first subset of tests was devoted to figure out what is the optimum gap between BPs. BPs are deployed following a rectangular grid in the hospital facilities ceil. The closer they are, the better the location algorithm performs, since it is most unlikely that a LWTB loses a beacon from a BP or that a LWTB receives beacons from less than four BPs, but the more expensive the deployment is, because more BPs are needed to cover the same area. Different configurations were tested, deploying BPs in rectangles of 100, 150, and 200 m\({}^{2}\), the best results being obtained for the rectangles of smallest area. Therefore, our recommendation as a design criterion is that the area of the sub-rectangles of the BP grid network should not exceed 100 m\({}^{2}\).  
The main goal of the second subset of test was to maximize the performance of the Location Subsystem for the chosen DP deployment configuration by tuning different parameters. The parameters that were considered are:  
* The period of time LWTBs send information (Ptx_loc)
* The period of time Beacon Points send beacons (Pbeacons)
* The time end nodes spend listening to each location channel from the 4 available ones (Tlisten)  
Note that the lower Ptx_loc is selected, the more accurate the patients' locations drawn in the map are, since the Management Server receives location information more frequently, but the more battery LWTBs spend, because they send information more frequently too. Furthermore, it has to be taken into account that Ptx_loc must be always higher than the time the end node needs to listen to the 4 channels available for location and that Tlisten must be at least twice Pbeacons in order to ensure there is enough time to receive at least one beacon:  
\[\textit{Ptx\_loc}\geq\textit{Tlisten\cdot Nchannels} \tag{1}\]  
\[\textit{Tlisten}\geq 2\cdot\textit{Pbeacons} \tag{2}\]  
The five configurations shown in Table 40 were tested and it was checked qualitatively that the configuration set in test number 5 performed better than the others, so it is the recommended one.  
In this configuration, Ptx_loc is set to the minimum value in order to reduce the latency and to improve the location of patients when they are moving around. To reduce the probability of losing a beacon, Tlisten is set to 4 times Pbeacons. Hence, if a beacon gets lost there is still enough time to receive at least another two. This decision improves significantly the stability of the location algorithm.  
The error margin of the location algorithm was proved to be around 2 m\({}^{2}\). This error margin improves the results obtained in [66], despite the fact that the results presented in [66] were obtained outdoors. This is mainly because the BPs are placed much closer to one another in this case than in the experiments carried out in [66] (10 m \(\times\) 10 m in these tests and 43 m \(\times\) 43 m in [66]). However, this accuracy is similar to the one reported in CodeBlue [25], where the location algorithm is based on RSSI signatures.