Indoor Positioning System Based on a PSD Detector, Precise Positioning of Agents in Motion Using AoA Techniques

Here, we present an indoor positioning system (IPS) for detecting mobile agents based on a single Position Sensitive Device sensor (PSD) sited in the environment and InfraRed Emitter Diode (IRED) located on mobile agents. The main goal of the work is to develop an alternative IPS to other sensing technologies, cheaper, easier to install and with a low computational load to obtain a high rate of measurements per second. The proposed IPS has the capacity to accurately determine 3D position from the angle of arrival (AoA) of the signal received at the PSD sensor. In this first approach to the method, the agents are considered to move along a plane. We propose two alternatives for determining position: in one, tones are emitted on a frequency unique to each transmitter, while in the other, sequences are emitted.The paper proposes and set up a very simple and easy to deploy system capable of performing 3D positioning with a single analog sensor, obtaining a high accurate positioning and a reduced execution time for the signal processing. The low computational load of the IPS makes it possible to obtain a very high position update rate (more than 100 times per second), yielding millimetric accuracies.


Introduction
Indoor positioning systems (IPS) use a wide range of technologies [1], each of which presents different characteristics tailored to different applications, with varying degrees of success. The choice of technology is determined by different requirements, such as cost, maintenance, privacy, accuracy, position update speed, cover, consumption and infrastructure. However, it should be noted that all these technologies can be complementary.
IPS have multiple applications that range from providing support for people with special needs [2] to tracking users in large areas [3], guiding people at train stations, airports [4], museums [5], supermarkets [6], bookstores [7] and car parks [8] and providing security at major events, hospitals [9], prisons, underground stations, airports and on trains.
In the industrial field, IPS applications are used in smart factories [10] that deploy autonomous robots that move and cooperate with each other to perform various tasks. One example of this type of application is presented in [11], which used an autonomous robot to move objects within an environment.
The currently available IPS technologies are presented in [1], giving examples of each together with their characteristics. The technologies of interest in this study were those systems that yield centimetric accuracies, namely vision, magnetic, ultrasound and infrared systems. An example of a vision-based IPS is presented in [12], in which a camera was sited on the ceiling of the environment and artificial marks were placed on the agents, achieving accuracies of 1 cm and 5 o in the orientation of the agent.
Another technology of interest is ultrasound. This is widely used due to the low cost of the infrastructure while yielding good accuracy, and one of the best known IPS is the Cricket system [13], which is based on calculating the time of flight from transmitters located in the environment to the receiver incorporated in the agent, synchronising clocks by means of an RF (Radio Frequency) signal. In [14], ultrasound was used to perform measurements of the Time Difference of Arrival (TDoA) in order to determine position, emitting different sequences for each transmitter located in the environment and equipping the mobile agent with a receiver.
Another technology of great interest is RF. The RF-based systems have several advantages over other systems such as using infrastructure already installed (e.g., WLAN (Wireless Local Area Network) access points) in large spaces such as shopping malls, airports, etc., which makes it a low cost system, with a coverage distance around tens of meters, besides that they do not required a direct line of sight path (LOS) between emitter and receiver, therefore they have longer coverage even in the presence of obstacles. On the other hand, RF-based systems have a reduced accuracy up to several tens of centimeters, even reaching meters of error according to the distances between emitter and receivers, and presence of obstacles (furniture, building structure, people, etc.). A review of the different positioning methods used by RF-based systems is done in [15] and more recent examples can be found in [16] where the position determination of the target is done by means of geometrical methods achieving errors of several decimeters, being a simple and robust algorithm to be used in noisy environments. In [17], they develop an IPS merging RF and ultrasound technologies, using RF to obtain the starting point of the tracking and the ultrasound system for later displacements obtaining higher accuracy.
There are a few and also old research works that use PSD (Position Sensitive Detector) sensors for the indoor positioning of mobile agents, for example [18,19]. In [18], the authors propose a PSD-based IPS placed on a height of 2.5 m making use of a Kalman filter to track a mobile robot that moves at a constant speed on a ground floor. The location results give a maximum error of 8.97 cm and average error of 1.97 cm, in a coverage area of 3 × 3 m 2 . The maximum error comes from the location of the robot in the periphery of the monitored area.
On the other hand, Ref. [19] proposes a multiple PSD system located around the surveillance area where a mobile robot with an emitter moves freely. The positioning algorithm is done by means of trilateration, obtaining the distances from each PSD and the robot through stereoscopic measurements. The results achieved in the test indicate that the error in the distance measurements increase linearly from 70 cm to 440 cm showing a nonlinear behavior outside of that distance boundary.
Visible or infrared light-based IPS are possibly the least developed to date. Related to these approaches, the other potential function of LED (Light-Emitting Diode) light in the context of VLC (Visible Light Communication) can be wireless communication and positioning, which make them an attractive research topic. The duplicate use of LEDs for lighting eliminates the cost of installing a positioning system based on VLC. Furthermore, the absence of electromagnetic interferences makes the use of LEDs particularly interesting; positioning based on VLC can be used as an indoor navigation system for location tracking, finding objects, controlling the movement of agents, etc.
Interesting works for the reader such as [20] proposes a design for an indoor positioning system using LEDs, an image sensor (IS) and an accelerometer from mobile devices. The proposed scheme consists of four LEDs mounted on the ceiling transmitting their own three-dimensional world coordinates and an IS at an unknown position receiving and demodulating the signals. Based on the 3D world coordinates and the 2D image coordinate of LEDs, the position of the mobile device is determined. To further improve the accuracy, also propose a mechanism to reduce the image sensor noise. With the assumption that the IS coordinate space is parallel to the world reference plane, they evaluate the accuracy obtaining values below 10 cm. They also make a comparison with other state-of-the-art techniques such as [21,22] showing the reaching of similar accuracy results. Another example is presented in [23], in which a visible light-based IPS was designed using multiple photodiodes in the environment and the received signal strength (RSS) to determine the position of the mobile agent, obtaining mean error of 7 cm in a range of 2 m. The main problem encountered was the low SNR (Signal-Noise Ratio) as distance and angles increase. Work in [24] proposes an indoor VLC and positioning system using the orthogonal frequency division multiplexing access scheme (OFDMA), in which the signals transmitted by LEDs are encoded with allocated subcarrier, respectively, and the receiver recovers all transmitted signals using a discrete Fourier transformation (DFT) operation. The feasibility of the scheme is demonstrated in a room of size 20 × 20 × 15 cm 3 . They show that the proposed scheme offers a mean positioning error of 1.68 cm, overcoming 2 cm of maximum error.
The work in [25] proposes a system based on LED-beacons and an IR-camera (InfraRed-camera). The modulation and detection technologies used are similar to those of VLC, not optimized for bandwidth but for an optimal detection of the LED beacon. They obtain a 5% of false positives and false negatives in the location of the LED beacons.
In another similar work [26], the authors also use four LEDs and IR-camera. The paper proposes a fast coding/decoding scheme to be able to use low-cost artificial vision devices (e.g., smartphones).
The research work [27] proposes a different system, based on emitting IRED (InfraRed Emitting Diode) beacons from the mobile agents and deploying an array of photodiodes as detectors. The 3D positioning is obtained by measuring the angle between the emitter and several photodiodes receivers.
The tests were done in a coverage area of 7 m × 2 m obtaining errors up to 0.7 m . This system is more expensive and difficult to install, calibrate and deploy than the system we propose in our paper based on a single PSD sensor.
The main drawback of these technologies concerns the multipath (MP) by which the signal reaches the receivers. Looking solely at optical signals, the model of near-infrared (NIR) signal reflection reported in [28] enabled us to model and analyze how this affects AoA (Angle of Arrival) and DPoA (Difference Phase of Arrival) measurement techniques and take this into account in our study.
Here, we present an indoor positioning system (IPS) with the capacity to accurately determine the position of mobile agents based on optical signals and a PSD sensor. The computational load of the system and methods proposed is very low, making it possible to obtain a very high position update rate. In this first report on the method, we focus on describing the proposals and evaluating the positioning methods.
Based on [29], which describes the sources of electrical errors in a PSD sensor system and how to correct and mitigate the effects of these sources, and [30], which describes a geometric model of a PSD sensor-optics system and a calibration process to obtain intrinsic parameters, we designed a system for determining the 3D position of mobile agents using the angle of arrival (AoA).

Background
To determine 3D position from the angle of arrival, it is necessary to perform an electrical calibration as described in [29], and a geometric calibration as described in [30]. In [29], the authors modeled signal conditioning and sources of error (gain factor imbalances, temperature variations, signal noise and quantification noise). The main errors arose from signal noise and gain imbalances in the PSD sensor channels, which could be substantially mitigated by using digital filters and performing electrical calibration.
It should be noted that the intrinsic parameters of the set composed by the PSD + lens when obtaining the positioning of some mobile agent, as developed in [29,30], must be perfectly modeled and calibrated; otherwise, the errors are huge, turning useless the system.
Once electrical calibration has been performed, the final equations for calculating the point of impact are given by Equations (1) and (2): where V xi,yi are the amplifier stage output signals, and L x andL y are PSD sensor size. Meanwhile, geometric calibration is based on obtaining the parameters that model the receiver system ( Figure 1) in order to calculate the angle of arrival. In Figure 1, (x, y) represent the points in the PSD sensor, (C x , C y ) is the optical center, f is the focal length, (X, Y, Z) are the points in the transmitter in the environment and (θ x , θ y ) are the angles of arrival, using Equations (3) and (4) to calculate the angles: As can be seen, the field of vision is related to the size of the PSD sensor and the focal length of the lens, according to Equation (5): where d is the diagonal of the sensor and f is the focal length of the lens.
The optical system must meet certain requirements. These include the balance between lens size and the energy it will receive, and, therefore, the SNR, and the compromise between focal length and the FoV (Field of View) that the sensor covers. It is also necessary to consider aspects of manufacture, since the longer the focal length, the larger the lens diameter (or the lens would be too thick), and, consequently, the FoV is reduced and may not reach the desired scope.
The solution to this problem is to use an optical group composed of various lenses, which reduces transmittance because each lens reflects part of the light; however, this means that, in systems where the received signal strength is low, the required SNR may not be achieved. Figure 2 gives an example of the field of view with two sensor sizes and various focal lengths.  Given the above background, we describe below the PSD sensor based positioning strategies to perform a high number of measurements per second and determine the position of multiple agents simultaneously without losing location accuracy, highlighting the simplicity of these methods.

Proposed Positioning Method
Here, we describe a method for determining mobile positions using a single receiver and assuming that the mobile robot moves along a plane. Under these conditions, the geometry of the plane and the direction vector of the agents relative to the receiver must be determined to obtain the intersection of plane and direction, which gives the 3D position. Figure 3 shows a diagram of the proposed IPS; the detector is located in the environment and the mobile agents equipped with IRED transmitters move along a plane. In Figure 3, (X, Y, Z) are the coordinates for points in the environment with reference to the receiver and (A, B, C, D) are the parameters that model the plane.
The proposed positioning method is based on three steps: • determining the equation for the plane of movement of the agents; • determining the angle of the agent with respect to the PSD sensor; • obtaining the 3D positions.
The equation for the plane is obtained in an offline procedure; the vector direction of the agents is obtained from the point of impact on the PSD sensor of the signal emitted using Equations (3) and (4) and the 3D position is obtained from the intersection of the vector direction and plane.
To determine the position, two alternatives are proposed with respect to the signals used; the first is based on sinusoidal signals (different frequencies for different agents, proposed when commencing the study) and the second on emitting sequences and correlating the signal received with the replicas of the same.

Calibration of the Plane
To calculate the plane along which the mobile robot moves, it is necessary to determine the 3D position of three or more points on that plane, relative to the receiver. We used a calibration template to obtain the rotation matrix and the translation vector between the template and the receiver, and subsequently to obtain the plane parameters. This template consists of transmitters located in the environment at five or more points with known relative positions that cover the largest possible area of the receivers FoV. These relative positions and their images in the sensor are used to obtain a projection matrix; then, the rotation and translation matrices are calculated followed by the plane parameters, as described below.

•
Projection matrix (homography): where (X t , Y t ) are the coordinates of the points of the two-dimensional template relative to any point in the template, and (x, y) represent the projection of these points onto the receiver. Singular value decomposition of the matrix system (6) yields the projection matrix elements m ij , as explained in [31]: • Rotation matrix and translation vector: once the projection matrix has been obtained, the rotation matrix and translation vector parameters are obtained using Equations (7)- (10): where λ = 1 A −1 m 1 , A is the matrix of the intrinsic parameters obtained from the geometric calibration, and m 1 , m 2 , and m 3 are the column vectors of the projection matrix. Next, the rotation matrix and translation vector are used to calculate the 3D coordinates of the template points with respect to the receiver: • Obtaining the plane parameters: the final task is to obtain the values that model the plane. Using three or more of the previously obtained points that do not belong to the same line, resolving the system (12) by SVD, the plane parameters are obtained: x n y n z n 1 3.2. Calculating the Point of Impact

Using Sinusoidal Signals
In the case of using sinusoidal signals, the number of different frequencies (agents) that can be used in the future when operating with more than one transmitter will depend on the system BW (BandWidth). In any event, using one or more tones, the position is obtained by calculating the RMS (Root Mean Square) value of the output signals from the four PSD sensor channels. The higher the frequency employed, the lower the acquisition time required to perform good tracking.
Once the emitted frequency (or frequencies) is known, a higher SNR is obtained by using an IIR (Infinite Impulse Response) filter, which has a smaller number of coefficients and thus implies a lower computational load. Narrower filters can be used with fewer coefficients (with several agents, it will be necessary to filter each tone to isolate their signals). However, note that an IIR filter may oscillate. Equation (13) gives the general equation.
where x is the digitised input signal, y is the signal at the filter output, and a i and b k are the filter coefficients, where i = {0, 1, . . . , N} and k = {0, 1, . . . , M}.
Once the four PSD sensor signals have been filtered, their RMS values are calculated and Equations (1) and (2) are then used to calculate the points of impact.

Using Sequences
The other alternative consists of emitting different sequences and correlating reception with their replicas; the advantage of this method is that agents can easily be added and the SNR can be improved using longer sequences. However, long sequences lead to increased acquisition times and slower position update rates.
As regards the type of sequence to use, for our initial tests, we selected GOLD sequences modulated by BPSK (Binary Phase Shift Keying) with a frequency equal to the chirp frequency. To calculate the point of impact, the PSD sensor output signals are correlated with the replicas to obtain a peak value for each channel, and these four values are used in Equations (1) and (2) to calculate the point of impact, where V represents the correlation values. Interference errors may occur if different sequences are used simultaneously, but these can be mitigated or corrected by algorithms, as detailed in [32].

Determining the 3D Position of the Mobile Robot
Once the displacement plane, the angle of arrival and the point of impact on the PSD sensor are known, the position can be deduced.
The equation for the plane in parametric form is: and the equation for the line of arrival of the signal to the receiver is: where i represents each transmitter, (θ x , θ y ) are the angles of arrival and (X, Y, Z) are the 3D coordinates with reference to the receiver. Substituting Equations (15) and (16) in Equation (14) and resolving Z, we have: Thus, replacing Z in (15) and (16) yields X and Y, thus obtaining the 3D position of the mobile robots.

Error Sensitivity
Error in position determination is given by error when obtaining the plane parameters (due to errors in determining the points of the template) and error when determining the angle of arrival.

Z Sensitivity with Respect to the Plane Parameters
The sensitivity of depth determination with respect to the plane parameters is obtained by derivating the A, B, C and D parameters from Equation (17). This sensitivity depends on the location of the receiver relative to the plane of movement of the mobile agent.
To provide an example of sensitivity when determining the Z coordinate due to errors in the calculation of the plane parameters, we will assume two situations: (a) with a plane coplanar to the PSD sensor, and (b) with a 15 o incline. Because template parameter sensitivity depends on template size, we have assumed a receiver with a 30 o field of vision sited 4 m high and covering 1800 mm. Table 1 shows the 3D coordinates used for the calibration template and the parameters of both planes are those in Table 2.  Figure 4a,b show the sensitivity, expressed as deviation in determining Z coordinate (mm) per each mm of error committed in determining the parameters of the plane ( Table 2).   As can be seen, small errors in the plane calibration template can give rise to not negligible errors in the calculation of Z; however, such errors can easily be minimized if the procedure is performed carefully.

Z Sensitivity with Respect to the Angles of Arrival
Another contributory factor to error when determining the 3D position of the mobile robot is the error committed when calculating the angle of arrival. In this case, the uncertainty of the depth error is obtained by derivating the incidence angles (θ x , θ y ) from (17). Figure 6a shows the error in Z for different errors in the angle of arrival when the plane is inclined 15 • , since the error is 0 in the case of the coplanar plane and the errors in X and Y coordinates due to the AoA error is shown in Figure 6b. As can be seen, small errors in the calibration template and determination of the angle of arrival can give rise to substantial error in the calculation of Z and also generates greater error in the X and Y coordinates than in Z.
This section has demonstrated that small errors in calibration of the plane of movement of the mobile agents and calculation of the angle of arrival may lead to decimetric errors. Below, we report the results of experimental tests, indicating the magnitudes of error in the plane parameters and in determination of the angle of arrival.

Empirical Results
In this section, we report the results of three experimental tests. In the first, we used the automated support shown in Figure 7 to quantify the error in determining the angle of arrival. The second test consisted of determining the 3D position of an IR transmitter in static situations, while the third test involved a moving agent (in both cases using a sinusoidal signal and a sequence). The results were compared with those obtained with a vision-based IPS. For the tests, we used a Hamamatsu (Hamamatsu City, Shizuoka Pref., Japan) S5991-01 PSD sensor and a 1-inch diameter, 16 mm ± 8% focal length lens and an IR emitter Osram (Munich, Germany) SFH 4233, selected because it is a high power emitter with a Lambertian pattern and low rise and fall times. Two different systems have been used to carry out the tests. For the initial laboratory tests done with the workbench, we have used the following components: a data acquisition board GAGE (Lockport, IL, USA) CS8284 configured with a sampling frequency of 10 MS/s, 12-bit resolution and input voltage range from 100 mV to 5 V. To process the acquired data we have used a PC (CPU Intel R Core TM i5-660, RAM memory 8 GB DDR3-1333 and SO Microsoft R Windows 7 Enterprise) with MATLAB 2015a suite. The tests that obtained data from a real scenario (shown in Sections 5.2 and 5.3) have been also performed using a self-developed prototype system, composed of two boards. The first one has been totally designed by our research team (Figure 8a) to include the critical and sensitive aspects required by our system: the PSD sensor, the conditioning and amplification of nano-amper current signals received from the PSD-very noise sensitive-and digitalization of the four signals provided; the developed board has been connected to a second board with a SoC (system-on-chip), which has a logical area for reconfigurable hardware (a MicroZed TM board based on the Xilinx Zynq R -7000). Thus, the second board is configured with the required hardware to obtain the digital signals from the first board and implement a preprocessing block in hardware to later obtain via software the coordinates of the 3D positioning. This flexible structure makes possible to develop future add-ons for better use of data while making easier the design of a higher level application on top of the ARM standard processing system included in the Zynq (Figure 8b). Figure 8c shows the connection of the boards. In Figure 8d, we present the final enclosed system, ready to be used in real scenarios.

Quantification of Error in the Angle of Arrival
The first test is focused in retrieving the error in the determination of the AoA. This is done using an automated workbench (Figure 7) that has 5 • of freedom (displacements along three translation axes and rotation around two angular axes), but, in this test, it is not necessary to make use of all of them. In the case of translation movement, the workbench is equipped with magnetic encoders with a 1 mm resolution, and in the case of rotation, the encoders have a resolution of 0.025 • .
The rotation and movement of the workbench is controlled from a computer (e.g., 5 • increments) and the workbench returns once the order is fulfilled which are the real degrees rotated with an error of the resolution of its encoders (in this case).
As the error has a circular symmetry around the normal vector to the PSD sensor surface in three-dimensions, to quantify the error done in the determination of the angle of arrival (AoA), only one angle has been modified in the emitter-receiver system (orientation of the detector) while moving the emitter in two-axes along a plane parallel to the original PSD surface (nine different mapped locations), as shown in Figure 9. Given the accuracy of the automated workbench (0.025 • ), we will be able to determine, with the tolerance given by these values, the error in the PSD positioning.
To perform the experiment, the emitter has been placed in nine different positions forming a planar grid (Figure 9). For each of these nine points, the detector has been placed at the reset location (0 • ), and it has been rotated 5 and 10 • . The AoA has been calculated from the received signal in the detector for each one of those angular increments. Ideally, in all cases, an increment of 5 • should be obtained. Table 3 shows the error for each 5 • increment, the differences between the angles measured by the receiver for the different orientations.
This test has been carried out averaging 100 measurements captured for each point; the system is configured with a sampling frequency of 10 MS/s; the emitted signal is a sinusoidal signal (511 cycles of a 50 kHz frequency). The sinusoidal signal has been captured with the PC-based system obtaining the RMS value of the received signal.  Figure 10 shows the Cumulative Distribution Function (CDF) obtained considering all the available measurements; it can be seen that, in 97% of the measures, the error is less than 0.  Table 3.
The resolution of the workbench magnetic sensor is 0.025 • while rotating the detector orientation in the empirical tests. However, it is worth noting that, to accurately perform the movements required in the tests, the workbench sensors resolution is more than enough. The uncertainty (maximum error) in the determination of the rotation angles is about the order of magnitude of the given encoder resolution. Therefore, the measurements will be affected by the encoder resolution, but, in any case, the test helps us to know that the measurements can be obtained with that accuracy.

Static Experimental Tests
In this section, we report the static tests performed in the environment shown in Figure 11. The first step was to calibrate the plane, which entailed moving the mobile agent. The height between the receiver and the plane was 2.5 m, thus covering an area of approximately 1.3 × 1.3 m 2 . One of the tests was to describe a circumference with a radius of 500 ± 1 mm, comparing this with the radius value obtained from the measurements to quantify the error.

Calibration of the Plane
To calibrate the plane along which the mobile robot would move, we used a five LED calibration template such as that shown in Figure 12a. This template was placed on the plane of movement to obtain the extrinsic parameters with respect to the PSD sensor, and the parameters of the plane of movement of the mobile robot were obtained from the 3D coordinates of the template LEDs, as indicated in Section 3.1. The projection of these points on the image plane is shown in Figure 12b. The template points and the image plane points were used to obtain the values for the rotation matrix and translation vector parameters shown in (18) and (19), respectively: Once the rotation matrix and translation vector had been obtained, they were used to calculate the 3D coordinates of the template points with respect to the PSD receiver. Table 4 shows these coordinates and Figure 13 shows their projection onto the environment.  Lastly, we calculated the plane parameters, which are shown in Table 5:

Determination of the 3D Position
Experiments in Section 5.2.2 have been carried out with the following setup: a total of 100 measurements are captured for each point for later averaging; the system is configured with a sampling frequency of 10 MS/s in this case.
When a sinusoidal signal is used, the receiver captures 511 cycles of a 50 kHz frequency sinusoidal signal to obtain its rms value. When GOLD sequences are used, the correlation peak value is calculated from 511 chirp sequences (also at a frequency of 50 kHz). These tests have been done using the PC-based platform previously defined.
With the transmitter placed describing a circumference of 500 ± 1 mm, we obtained images of these points in the sensor plane and calculated the angle of arrival. The 3D coordinates of the positions were obtained from the intersection of the lines given by the angles of incidence and the plane. Figure 14a shows the points calculated in the image plane of the receiver and Figure 14b shows the projection of the points onto the plane. Because the plane was not coplanar to the receiver, it was necessary to change the reference to the plane of movement in order to measure the radius and compare this with the real radius. In Figure 15, the reference system points on the plane of movement are shown in blue, and the circumference that best fits these points is shown in green, where: the radius of the circumference was 496.644 mm, the RMSE (Root Mean Square Error) was 2.2089 mm and the greatest error was 3.4272 mm. The radius value obtained was similar to that of the circumference, with an error of 3.3560 ± 1 mm, indicating that, in a static case, this method is highly accurate. Furthermore, these results also indicate that the parameters of the plane of movement contained little error.
In the previous test, the coverage area is restricted by the lens system FoV with a focal lenght of f = 16 mm having a FoV around 29 o . This FoV leads to a coverage area of 1.3 × 1.3 m 2 from a height of 2.5 m. We would require a lens with a shorter focal length to obtain a larger area coverage. Because the area of the sensor is 10 × 10 mm 2 , the lens diameter should be about one inch. However, currently, a one inch lens with a focal length f < 16 mm is not commercially available in the market, thus not allowing to make those tests. To enlarge the coverage area, we can increase the height. The geometric error will increase linearly with the distance, as a function of the incidence angle and SNR of the signals.
Regarding the accuracy error, the worst case to be considered is the impact on points in the periphery of the PSD sensor, with a large angle of incidence in the FoV. Take into account that we have considered sensor points to not be more distant from the sensor center than ±4.5 mm. Therefore, Table 6 shows the errors in the determination of the location of a mobile agent that corresponds with the most distant impact point (4.5 mm, 4.5 mm) for different heights and different SNR, with the surface of the PSD sensor coplanar to the surface of the agent movement. The results were obtained from an average of 100 trial tests considering introducing a white Gaussian noise (N(0, σ 2 )) with several SNRs: 20 dB, 30 dB and 40 dB, considering a working frequency of 50 kHz, sampling frequency of 10 MS/s and an acquisition time of 10.2 ms (equivalent to capture 511 signal cycles). As it could be expected, the error varies linearly with the height and is very small when the SNR > 30 dB.
This test was repeated using a GOLD sequence instead of a 50 kHz tone. With a sequence length greater than 127 symbols, the results were similar to those indicated, fitting perfectly for sequences of 511 cycles. Table 7 shows the processing time using both a PC based system and FPGA (Field Programmable Gate Array) based system. It is worth noting that, working with FPGA, we could assume that acquisition time and processing time are overlapped, and it is important to note that, for this test, 200 samples per cycle/chirp have been used. As it can be deduced from the obtained results, acquisition time (10.2 ms capturing 511 periods or sequence chirps) determines measurements per second. As it is deduced, the number of measurements reaches the value of 100 per second. If the emission frequency is increased or the number of cycles or samples per cycle reduced, the number of measurements per second increases proportionally.

Dynamic Tests
Lastly, we conducted two dynamic tests, one using a test bench in order to have a ground truth and a second test using the system in a real environment. The first test was done to determine the accuracy that can be achieved with the system, since the automated test bench data is accurately known (ground truth) and the second test was done to compare the results with artificial vision systems (developed also by our research group and based on Kinect cameras). From those tests, we can conclude that the results are similar, the PSD sensor being a cheaper system that is also simple and fast.
In the first case captured, we have taken 81 points forming a grid of 20 × 20 cm 2 ,with a distance between emitter and receiver of 1 m and moving the emitter at a constant speed of 0.2 m/s. These tests were performed using two different types of signals. In one case, sinusoidal signals have been emitted and the position has been calculated from the RMS value of the signals obtained from the PSD sensor (50 kHz and 10.2 ms of acquisition time, which are equivalent to 511 periods). In the other case, GOLD sequences (of 511 chirps) have been emitted, obtaining the impact point from the peak values of the correlation of the PSD signals.
The error results are shown graphically in Figure 16 and quantified in Table 8. It can be seen that the system yields a highly accurate determination of the location for both types of emissions (considering a SNR ≥ 40 dB). As it has been previously noted, the error will increase linearly along larger distances.
About making real tests in an environment with obstacles, these would have two main effects. First, if the obstacles blind the LOS (Line-of-Sight) path between emitter and detector, the positioning will not be possible. Second, considering that there is an LOS path, then the obstacles will introduce an MP effect in the determination of the location. An in-depth analysis is out of the scope of our paper (the MP effect will be studied in future works). However, in our related work [33], we have verified the effect of MP in our system and the result was that the fact of having obstacles that generate MP has a very little effect on the determination of the impact point with this technique. Note that the RSS received at each electrode of the PSD sensor is a subtractive composition of currents, which partially compensates the MP and their effect in the location determination. To test the performance of the gold-code correlation working in noisy environments or with low SNR, the same test done in the test before was performed with other SNR values (the original test considered a 30 dB SNR), retrieving the error done in the positioning for the 81 points under analysis.
From this test, the maximum error, the average error and the standard deviation varying the SNR from −20 to 30 dB values, with 1 m of the distance, sequence length 511 and 10 MHz sampling frequency, has been verified. Table 9 shows the numerical results obtained and Figure 17 shows these data in graphical form. It can be verified that the performance of the system is quite good as long as the SNR does not go below −10 dB.    The second test was conducted in the environment shown in Figure 19, where the P3DX robot can be seen. The receiver was located 4 m above the plane of movement, and the parameters obtained in plane determination are shown in Table 10.  As in the previous cases, the transmitter used a 50 kHz signal (with an acquisition time for position calculation of 10 ms) in one test, and a GOLD sequence of 1023 chirps in the other. The sampling frequency was 10 MHz. The environment where the test was performed was equipped with another vision-based IPS using Kinect cameras, and this was used to compare the position detected by each system. To perform the test, the robot was programmed to move in a spiral. In the first test, positioning was performed by our system (using a 50 kHz emitted tone) and was Kinect IPS based; in the second test, the spiral movement was repeated and positioning was performed using GOLD sequences.
In Figure 20, the paths obtained using the three systems (Kinect and the proposed method with 50 kHz tones and the GOLD sequence) have been superimposed. The mean difference between the Kinect and proposed positioning systems using a tone was 3.6172 cm (STD = 2.4863 cm), while the maximum difference was 15.8692 cm. A comparison of the results obtained with our system using a tone and a sequence indicated that the maximum difference was 1.4 cm.
A video of real-time positioning using the Kinect and the proposed system with a 50 kHz tone can be viewed in [34]. The full video can be viewed on the web. To show the behavior of the proposed system working simultaneously with several mobile agents, a multi-agent test has been setup composed of three emitters using each one a different frequency (40 kHz, 60 kHz and 80 kHz). The emitters were placed on a right triangle with 400 mm legs and the PSD sensor was placed at a height of 2.7 m. The output signals from the PSD system are shown in Figure 21a (the four signals are a composition of the three emitted frequencies). Figure 21b shows the FFT (Fast Fourier Transformation) of the signal (Out 4) where the three frequency components are obtained, besides the offset. The signals are further processed by three band pass filters centered on the working frequencies corresponding to each emitter, obtaining the three output signals shown in Figure 22a. Performing this filtering for all the signals and applying Equations (1) and (2), the impact points of the IREDs are obtained (shown in Figure 22b). Computing the AoA and knowing the plane of movement for the emitter agents, their 3D positions are determined (shown in Figure 23). The errors in the determination of the right triangle legs (ideally 400 mm) are 7.7 mm and 5.2 mm.

Results Comparison
There are few research works for IPS using PSD sensors, but more using optical signals by means of other technologies. The comparison with other research works have a limited relative value; however, in Table 11, we show the technology used, coverage area and accuracy of different related IPS systems compared with ours. Table 11. Comparison of results obtained by systems proposed from other research works.

Conclusions
We have presented a proposal here for an IPS based on PSD sensors that yields millimetric accuracies, as has been demonstrated in various experimental tests. The positioning system and method have been designed so that more agents can easily be added (a question that is being addressed in current studies) without affecting accuracy. In addition, more receivers can be added, whether working together or not, because they do not need to be synchronized. We have proposed two types of transmissions, one using frequency tones and another using different sequences. We have analyzed the sensitivity of the system to error, indicating how this affects measurements and the precautions to take to ensure that the system is accurate in all cases. With regard to accuracy, experimental tests have demonstrated that the system commits errors of less than 0.1 • in the 97% of the measurements performed when determining angles and the RMSE in determining the position, with PSD placed on a height of 2.5 m, was 2.2089 mm and the greatest error was 3.4272 mm. The proposed method does not entail a high computational load because it is sufficient to measure the angle of arrival and calculate the intersection of the lines given by the angle and the plane to determine position. In future works we will develop a system for determining multi agents' positions using sequences and the self-developed prototype (shown in Figure 8c). In addition, we will analyze the effects of MP in our method and develop a new positioning method based on RSS and AoA.