Customization of UWB 3D-RTLS Based on the New Uncertainty Model of the AoA Ranging Technique

The increased potential and effectiveness of Real-time Locating Systems (RTLSs) substantially influence their application spectrum. They are widely used, inter alia, in the industrial sector, healthcare, home care, and in logistic and security applications. The research aims to develop an analytical method to customize UWB-based RTLS, in order to improve their localization performance in terms of accuracy and precision. The analytical uncertainty model of Angle of Arrival (AoA) localization in a 3D indoor space, which is the foundation of the customization concept, is established in a working environment. Additionally, a suitable angular-based 3D localization algorithm is introduced. The paper investigates the following issues: the influence of the proposed correction vector on the localization accuracy; the impact of the system’s configuration and LS’s relative deployment on the localization precision distribution map. The advantages of the method are verified by comparing them with a reference commercial RTLS localization engine. The results of simulations and physical experiments prove the value of the proposed customization method. The research confirms that the analytical uncertainty model is the valid representation of RTLS’ localization uncertainty in terms of accuracy and precision and can be useful for its performance improvement. The research shows, that the Angle of Arrival localization in a 3D indoor space applying the simple angular-based localization algorithm and correction vector improves of localization accuracy and precision in a way that the system challenges the reference hardware advanced localization engine. Moreover, the research guides the deployment of location sensors to enhance the localization precision.


Introduction
The continuing development of wireless technologies has led to an enhancement of the capabilities and efficiency of Real-time Locating Systems (RTLSs), which are a particular example of Indoor Locating Systems (ILSs). RTLSs have the ability to define the position of an item anywhere in a defined space at a point in time that is, or is close to a real time [1]. Ultra-wideband (UWB) is a short-range and energy efficient radio technology useful in a high-bandwidth wireless communication. Due to their functionalities and performances, the use of UWB-based RTLSs as tracking management systems has gained increasing attention in industrial and logistic applications, for instance container terminals [2], and warehouses [3]. Besides that, RTLSs have been widely applied in security applications in

Problem Statement and Main Contribution
From the review of related works, one can notice that localization methods for RTLSs perform differently. The accuracy, precision, processing time, cost and simplicity are the main measures of the system performance. Then, the challenge is to find out trade-offs of various aspects of the system's performance for different methods. Furthermore, there are many factors influencing the performance of an indoor 3D localization, inter alia the system architecture, working environment, possible interferences etc. Most of the localization algorithms estimating the tag's position in the indoor environment use ranging techniques, which are based on different measurement signals such as RSS, TDoA, AoA. Among these solutions, the angle-based (AoA ranging technique) localization algorithms show a big potential of performance improvement, especially in 3D applications. Therefore, one of the possible enhancement approaches is to develop a measurement analytical model, which can facilitate the customization of the AoA ranging technique in different 3D environments.
The main objective of this paper is to develop and then to implement in a simulation environment the geometrical (analytical) uncertainty model of AoA localization in a 3D indoor space, while considering the localization uncertainty in terms of accuracy and precision, which extends and enhances the uncertainty model proposed in [12]. The goal of modelling is to determine the efficient system configuration. Furthermore, the proposed model facilitates the system customization by defining and implementing the correction vectors for different working environments in order to improve the system's performance in terms of its accuracy. Additionally, the angular-based 3D localization algorithm, which estimates the tag's position in 3D from interfered measurement signals of azimuth and elevation angles, is introduced.
The main contribution of this paper is an improvement method of system's performance by applying the analytical customization for different working environments. The method is based on a new holistic approach to localization uncertainty in terms of precision and accuracy, and defining a geometrical model of the AoA localization method in 3D. The model facilitates an uncertainty analysis of the AoA ranging technique. The analytical model is implemented in Matlab and used to show how different the system's features influence its performance. The measurement precision model is verified by analysing the matching ratio of the simulated and experimental results. To show the accuracy enhancement, by applying the correction vector, the proposed customization of the system for a given working environment is validated by physical experiment. The reference RTLS localization algorithm is applied to verify that the customization of AoA ranging techniques can challenge the advances in hardware of the UWB-based RTLS technology.

RTLS's Performance Assessment
The assessment of RTLS's performance is necessary to find trade-offs among different technologies and methods. In general, the assessment needs to be considered separately for static and dynamic localization modes [4,39]. In the static mode, it can be evaluated using different measures inter alia localization uncertainty, sensitivity [9] and response time. In the dynamic mode, these measures are affected by the speed of a tag, a number of tags, and the complexity of their paths.
The simplified interpretation of 3D localization uncertainty in terms of accuracy and precision measures at the true tag's position P i in coordinates (x i , y i , z i ,) is illustrated in Figure 1. The accuracy measure ∆ represents the distance between the true position and the location estimate obtained from the RTLS, whereas, the precision is illustrated by the sphere with an estimate's standard error as a radius. The sphere is centered in the estimated position and includes respectively 68% of N measured localization samples. Both localization uncertainty measures: accuracy and precision characterized dispersion of measured results from the tag's true position. In the following sections, the localization performance is modelled in a static mode using the two measures: accuracy and precision [40].

Accuracy
The accuracy property expresses the capability to obtain the true value of a measurand [40]. The mean uncertainty component, the localization accuracy, ∆ of the x coordinate estimated for the point located in the test environment, can be expressed as: where variables of ( , , ) respectively refer to the true localization coordinates at i-th position of the tag, whereas variables of ( , , ̂ ) refer to the mean of N-th times measured localization coordinates at i-th tag's position. If the remaining two mean uncertainty components ∆ , and ∆ , of y and z coordinates respectively are specified analogically to Equation (1), then the localization uncertainty ∆ at i-th tag's position can be shown as follows:

Precision
The second uncertainty measure, the localization precision, describes the measurement's repeatability and is based on an estimate of the mean standard error of the mean localization uncertainty. A low value of the standard error means high precision and vice versa. For the i-th tag's position, which is estimated from N measurements, a standard error of the mean (SEM) of the component x, can be expressed in relation to its variance as: where and are SEM and variance respectively of the x component at i-th tag's position. The remaining two SEMs and of y and z coordinates respectively can be described analogically. Then the corresponding SEM of the localization estimate of i-th tag's position can be calculated as follows: The accuracy measure ∆ i represents the distance between the true position P i and the location estimateP i obtained from the RTLS, whereas, the precision is illustrated by the sphere with an estimate's standard error σ i as a radius. The sphere is centered in the estimated positionP i and includes respectively 68% of N measured localization samples. Both localization uncertainty measures: accuracy and precision characterized dispersion of measured results from the tag's true position. In the following sections, the localization performance is modelled in a static mode using the two measures: accuracy and precision [40].

Accuracy
The accuracy property expresses the capability to obtain the true value of a measurand [40]. The mean uncertainty component, the localization accuracy, ∆x i of the x coordinate estimated for the point P i located in the test environment, can be expressed as: where variables of P i (x i , y i , z i ) respectively refer to the true localization coordinates at i-th position of the tag, whereas variables ofP i (x i ,ŷ i ,ẑ i ) refer to the mean of N-th times measured localization coordinates at i-th tag's position. If the remaining two mean uncertainty components ∆y i , and ∆z i , of y and z coordinates respectively are specified analogically to Equation (1), then the localization uncertainty ∆ i at i-th tag's position can be shown as follows:

Precision
The second uncertainty measure, the localization precision, describes the measurement's repeatability and is based on an estimate of the mean standard error σ of the mean localization uncertainty. A low value of the standard error means high precision and vice versa. For the i-th tag's position, which is estimated from N measurements, a standard error of the mean (SEM) σ x of the component x, can be expressed in relation to its variance as: where σ x i and σ 2 x i are SEM and variance respectively of the x component at i-th tag's position. The remaining two SEMs σ y i and σ z i of y and z coordinates respectively can be described analogically. Then the corresponding SEM σ i of the localization estimate of i-th tag's position can be calculated as follows:

The AoA-Based Localization Algorithm
The angular-based localization algorithms of RTLSs use angles of arrival of the radio wave, measured by a pair of LSs. For each measurement cycle, to determine the tag's location, AoA ranging and extrapolation procedures are processed one by one. In [12], the simplified 2D AoA localization algorithm using azimuth angles is presented. In the following subsection, a specific model of ranging technique using azimuth and elevation angles for the 3D localization is proposed. Moreover, the tag's location is estimated based on an extrapolation technique described in the second subsection of this chapter.

AoA Ranging Technique
The ranging technique, described in this section, is illustrated by the AB pair of LSs. The initial installation stage of the ranging technique procedure is performed only once, at the beginning of measurement process when the workspace and LSs' coordinates are defined and the system is calibrated. Then, from the installation data the workspace geometry and the coordinates, A(x A , y A , z A ) and B(x B , y B , z B ) of the active LSs' positions, are established. Moreover, the calibration procedures for azimuth and elevation angles are performed. The calibration procedure of UWB-based RTLS for azimuth angles is described in [12] and the calibration procedure for elevation angles looks similarly. Therefore, after the initial phase, the workspace geometry, LSs' coordinates, and even the calibration angles and lines are defined.
The basic stage of the AoA ranging technique is performed in each measurement cycle when the directions of the arrival paths from the tag to the two LSs are measured. Each LS consisting of antenna array element measures the direction of the receiving tag's radio wave as azimuth and elevation angles of arrival. Radio waves take the form of UWB pulses with very short durations, which are emitted by the tag. A geometrical interpretation of 3D AoA ranging techniques for a pair of LSs AB is illustrated in Figure 2. The line l A represents the arrival path, which passes through the tag's position T and LS A 's coordinates A(x A , y A , z A ). The line is projected perpendicularly onto the XY plane, called reference plane. The azimuth angle θ A is the angle between the line projected on the reference plane and the axis X. The elevation angle ϕ A is the angle between the line l A and the axis Z. Azimuth and elevation angles measured by the LS B are defined analogically.

The AoA-Based Localization Algorithm
The angular-based localization algorithms of RTLSs use angles of arrival of the radio wave, measured by a pair of LSs. For each measurement cycle, to determine the tag's location, AoA ranging and extrapolation procedures are processed one by one. In [12], the simplified 2D AoA localization algorithm using azimuth angles is presented. In the following subsection, a specific model of ranging technique using azimuth and elevation angles for the 3D localization is proposed. Moreover, the tag's location is estimated based on an extrapolation technique described in the second subsection of this chapter.

AoA Ranging Technique
The ranging technique, described in this section, is illustrated by the AB pair of LSs. The initial installation stage of the ranging technique procedure is performed only once, at the beginning of measurement process when the workspace and LSs' coordinates are defined and the system is calibrated. Then, from the installation data the workspace geometry and the coordinates, ( , , ) and ( , , ) of the active LSs' positions, are established. Moreover, the calibration procedures for azimuth and elevation angles are performed. The calibration procedure of UWB-based RTLS for azimuth angles is described in [12] and the calibration procedure for elevation angles looks similarly. Therefore, after the initial phase, the workspace geometry, LSs' coordinates, and even the calibration angles and lines are defined. The basic stage of the AoA ranging technique is performed in each measurement cycle when the directions of the arrival paths from the tag to the two LSs are measured. Each LS consisting of antenna array element measures the direction of the receiving tag's radio wave as azimuth and elevation angles of arrival. Radio waves take the form of UWB pulses with very short durations, which are emitted by the tag. A geometrical interpretation of 3D AoA ranging techniques for a pair of LSs AB is illustrated in Figure 2. The line represents the arrival path, which passes through the tag's position and LSA's coordinates ( , , ). The line is projected perpendicularly onto the XY plane, called reference plane. The azimuth angle is the angle between the line projected on the reference plane and the axis X. The elevation angle is the angle between the line and the axis Z. Azimuth and elevation angles measured by the LSB are defined analogically. The lines and can be represented by direction vectors and with initial points in and respectively. Both and direction vectors are computed from measured azimuth angles and and elevation angles and respectively. Then the vectors between the LSs placed in A and B and the tag are depicted as: The lines l A and l B can be represented by direction vectors u and v with initial points in A and B respectively. Both u and v direction vectors are computed from measured azimuth angles θ A and θ B and elevation angles ϕ A and ϕ B respectively. Then the vectors between the LSs placed in A and B and the tag are depicted as: where λ A and λ B are length parameters of the distance vectors, and u x , u y , u z and v x , v y , v z are direction vectors' u and v components respectively. Both direction vectors u and v along with the length parameters λ A and λ B and the coordinates of the initial points A and B determine the end-points T A and T B of distance vectors λ A u and λ B v respectively. Therefore, resultant points T A and T B , which estimate the tag's location are depicted as: In an ideal case, the tag's positionT is defined by T A = T B , since both points should have the same coordinates. Using Equations (7) and (8), a set of three separate linear functions is formed and the coordinates of the tag's positionT(x T , y T , z T ) along with the two parameters λ A and λ B can be calculated.

AoA Extrapolation Method
In general, due to the uncertainty of AoA measures, the arrival paths represented by the lines l A and l B for LS A and LS B respectively are askew and there is no intersection point, as shown in Figure 3. • sin cos (6) where and are length parameters of the distance vectors, and , , and , , are direction vectors' and components respectively. Both direction vectors and along with the length parameters and and the coordinates of the initial points A and B determine the end-points and of distance vectors and respectively. Therefore, resultant points and , which estimate the tag's location are depicted as: In an ideal case, the tag's position is defined by = , since both points should have the same coordinates. Using Equations (7) and (8), a set of three separate linear functions is formed and the coordinates of the tag's position ( , , ) along with the two parameters and can be calculated.

AoA Extrapolation Method
In general, due to the uncertainty of AoA measures, the arrival paths represented by the lines and for LSA and LSB respectively are askew and there is no intersection point, as shown in Figure 3. Then, the lines and need to be extrapolated to lines and respectively, which intersect in the extrapolated tag's position [41]. The extrapolated solution can be defined as the middle of the shortest distance between the lines and , which can be calculated using formula: The shortest distance between the lines and can be represented as a vector with the initial point's coordinates ( , , ) and the end point's coordinates ( , , ). Vector is perpendicular to both direction vectors and defined in the previous section. The extrapolated tag's position with coordinates ( , , ) is calculated as a midpoint of the vector using the following formula: Then, the lines l A and l B need to be extrapolated to lines m A and m B respectively, which intersect in the extrapolated tag's positionT [41]. The extrapolated solution can be defined as the middle of the shortest distance between the lines l A and l B , which can be calculated using formula: The shortest distance between the lines l A and l B can be represented as a vector d with the initial point's coordinates T T A x T A , y T A , z T A and the end point's coordinates T T B x T B , y T B , z T B . Vector d is perpendicular to both direction vectors u and v defined in the previous section. The extrapolated tag's positionT with coordinates (x T , y T , z T ) is calculated as a midpoint of the vector d using the following formula:T The extrapolated tag's positionT and two extrapolated arrival paths represented by lines m A and m B intersecting at the tag's positionT are used for the localization uncertainty modelling presented in the next section.

Modelling of Uncertainty of AoA-Based Localization
An uncertainty model of AoA localization in 3D is needed to customize the RTLS in different working environments to improve its performance. In [12] the localization uncertainty was represented by precision, sufficient for the applied enhancement method. However, the AoA localization uncertainty model might be upgrades with accuracy. For a specified RTLS architecture and working indoor environment, the model of localization measurement accuracy, defined here as an offset error, is presented in the first part of this chapter. The localization precision defined using a geometrical approach is introduced in the second subsection of this chapter.

Modelling of Offset Error and Correction Vector
For a specified UWB-based RTLS architecture used in a given working indoor environment, the uncertainty model of an offset error can be established heuristically. The offset error for a single measured position is systematic. However, for the given working environment consisting of a set of measured positions, the offset error consists of two components: random and systematic. Among others, the systematic component, which is constant for the whole environment, can be caused by the uncertainty of an initial calibration procedure when the calibration axes are defined in relation to the LSs' positions. Whereas, the random component, varying at different localizations can be an effect of environmental characteristics specific at a given position. Another cause of the offset error can be heterogeneity of tags' characteristics.
An effect of the localization offset error can be reduced by a correction vector, which depends on the system's architecture and test environment, and is to be estimated heuristically. It may include the following sources:
In a given environment, the correction vector for a certain pair of LSs, may be estimated based on measurements from k tags each sampled N times at M locations. For these numbers of tags, locations and samples, the x component of the correction vector, kv x , may be calculated from: where ∆x k,m,n is the difference between the true localization and the n-th measurement at m-th localization of k-th tag. The remaining two correction vector components kv y and kv z , of y and z coordinates respectively can be calculated analogically to Equation (11). Then the correction vector kv specified for the localization system in the test environment can be expressed as:

Modelling of the Precision of 3D Localisation Based on AoA Technique
The precision model applied to the AoA ranging technique in 2D is described in [12]. The presented geometrical model is based on the azimuth component of AoAs. Since it was shown, that the pairs located on the shorter sides of the workspace ensure the most precise AoA-based localization [12], therefore, the following description concerns the pair LS A and LS B placed in the fixed positions A(x A , y A , z A ) and B(x B , y B , z B ) on the shorter side of the workspace. The specified tag T is located at the position T i (x i , y i , z i ). However, the selected configuration does not limit the model's versatility.
For the LSs pair AB, each tag's position on the workspace is defined by a set of two azimuth angles and a set of two elevation angles. The first set consists of vectors AoA θ A and AoA θ B of azimuth angles of arrival θ Ai and θ Bi measured by LSs A and B respectively. Analogically, elevation angles of arrival ϕ Ai and ϕ Bi , measured by LSs A and B respectively, are represented by vectors AoA ϕ A and AoA ϕ B , which constitute the second set. Each measurement is repeated N times and using the ranging and extrapolation techniques, then N samples of i-th tag position T i are estimated as intersections (10) of lines m A and m B corresponding to the extrapolated paths of arrival. Based on experimental data, we assume that the distribution functions of azimuth and elevation measurements are normal. Then, at confidence level of 68.3%, the azimuth angles θ Ai and θ Bi are within the ranges where the mean values θ A and θ B represent the best estimate of azimuth angles and ±σ θ A and ±σ θ B depict the SEMs of the azimuth AoA for LS A and LS B respectively. These ranges define the precision of the azimuth angle measurement called azimuth Angle of Precision, (AoP). Per analogy, the elevation angles ϕ Ai and ϕ Bi are within the ranges  [27]. The probability distributions of the azimuth and elevation AoA of the set of N samples for location sensor LS B can be described analogically as respectively. The LS A is characterized by the elevation and azimuth AoPs, which can be used to form an elliptic cone representing the measurement precision in 3D, as shown in Figure 4. The cone's vertex is placed at the LS's position, A(x A , y A , z A ) and its axis refers to the mean path of arrival l A , and its base at the estimated tag's position is an ellipse with the axes defined by r θ A and r ϕ A as follows: From the equations, one can see that the size of the elliptic base depends on SEM of azimuth σ θ A and elevation σ ϕ A angles measurements and the distance from the active LS's position to tag's position T i . Therefore, since the distribution functions of the measurement precision of azimuth and elevation AoAs are normal distribution functions, representing the dispersion of the path of arrival of N samples, then the surface area of the elliptic cone's base at a given distance from the LS represents the bivariate SEM. The true localization occurs there with the confidence level of 68.2%.
Per analogy, the uncertainty of LS B is characterized by an elliptic cone with the vertex in LS's position B(x B , y B , z B ) and the axis refers to the mean path of arrival l B . The cone's base at the estimated tag's position is an ellipse, with the axes defined by r θ B and r ϕ B , respectively. The two elliptical cones with vertices at the active LSs' positions A(x A , y A , z A ) and B(x B , y B , z B ) represent the precision of tag's AoA measurements. The cones cross each other and their common part forms the solid where the tag is truly located with the 46.5% probability corresponding to the product of two SDs probabilities, see Figure 5. The volume of the solid depends on the:   The volume of the solid is a measure of the uncertainty-precision of 3D AoA ranging technique. Its shape depends on the tag's location in the test environment. The result of the cones' penetration is presented in Figure 5. This is a particular symmetrical case when both cones have the same shape since azimuth and elevation AoP values are equal, i.e., elevation angles , and azimuth angles and are equal. The volume of the solid is calculated numerically using the 3D Delaunay triangulation computing method called Delaunay tetrahedralization [43]. The algorithm calculates the volume of the solid based on the sum of each individual tetrahedral volume. The boundaries of the 3D Delaunay triangulation represent the convex hull of the points set as shown on Figure 6. The shape of the convex hull matches the theoretical solid shape presented in Figure 5.   The volume of the solid is a measure of the uncertainty-precision of 3D AoA ranging technique. Its shape depends on the tag's location in the test environment. The result of the cones' penetration is presented in Figure 5. This is a particular symmetrical case when both cones have the same shape since azimuth and elevation AoP values are equal, i.e., elevation angles , and azimuth angles and are equal. The volume of the solid is calculated numerically using the 3D Delaunay triangulation computing method called Delaunay tetrahedralization [43]. The algorithm calculates the volume of the solid based on the sum of each individual tetrahedral volume. The boundaries of the 3D Delaunay triangulation represent the convex hull of the points set as shown on Figure 6. The shape of the convex hull matches the theoretical solid shape presented in Figure 5.  The volume of the solid is a measure of the uncertainty-precision of 3D AoA ranging technique. Its shape depends on the tag's location in the test environment. The result of the cones' penetration is presented in Figure 5. This is a particular symmetrical case when both cones have the same shape since azimuth and elevation AoP values are equal, i.e., elevation angles ϕ A , ϕ B and azimuth angles θ A and θ B are equal.
The volume of the solid is calculated numerically using the 3D Delaunay triangulation computing method called Delaunay tetrahedralization [43]. The algorithm calculates the volume of the solid based on the sum of each individual tetrahedral volume. The boundaries of the 3D Delaunay triangulation represent the convex hull of the points set as shown on Figure 6. The shape of the convex hull matches the theoretical solid shape presented in Figure 5.  The volume of the solid is a measure of the uncertainty-precision of 3D AoA ranging technique. Its shape depends on the tag's location in the test environment. The result of the cones' penetration is presented in Figure 5. This is a particular symmetrical case when both cones have the same shape since azimuth and elevation AoP values are equal, i.e., elevation angles , and azimuth angles and are equal. The volume of the solid is calculated numerically using the 3D Delaunay triangulation computing method called Delaunay tetrahedralization [43]. The algorithm calculates the volume of the solid based on the sum of each individual tetrahedral volume. The boundaries of the 3D Delaunay triangulation represent the convex hull of the points set as shown on Figure 6. The shape of the convex hull matches the theoretical solid shape presented in Figure 5.

Precision Model Evaluation
The implementation of the proposed 3D model is done in Matlab 2014b with the Signal Processing, Optimization and Computational Geometry toolboxes. Then the implemented solution is evaluated using a simulated cuboidal test environment of 11.00 m × 7.50 m × 4.00 m size. The space is sampled with a constant step of 50.00 cm in three directions resulting in a test grid of samples. The sampling coordinates located on the border of the workspace, which physically would be placed on the walls, are excluded from the sampling grid.
The RTLS consists of four LSs, two located in the workspace corners on height 4 m and two located on height 3 m, see Table 1. The origin of the coordinate system is arbitrarily located on the floor at the workspace corner under LS A . The calibration point is located approximately in the centre of the workspace, explicitly at 5.60 m × 4.00 m × 1.00 m.
The model is applied to estimate the map of location uncertainty in terms of precision for two pairs of LSs, AB and AD, located on the longer and shorter walls of the test room respectively. For each sampling point, the location precision expressed as a volume is calculated from the azimuth and elevation AoPs. The SEM of azimuth and elevation AoAs for the tested workspace were heuristically determined from results of tests performed on 36 arbitrary selected location points of workspace for all LSs. The heuristically estimated mean SEM values of both azimuth and elevation AoAs' standard deviations were 0.45 • . Therefore, the measurement uncertainty in terms of precision of each LS is represented by a cone with vertices in LSs' positions, the axes are defined as the arrival path (Section 5.2) and the circular base with the radius calculated using Equation (13) or (14). The modelled localization precision was determined by using the common volume of two cones, whose axes intersect at the sample location. The localization precision was calculated using the 3D Delaunay triangulation computing method (Section 6.2).
The distribution map of the modelled AoA localization precision for an AD pair is presented in Figure 7. The LS A and LS D are located at slightly different heights of the shorter wall of the workspace, as shown in Table 1. The slices represent orthogonal planes through the volume of the workspace, and the colours correspond to precision levels.
The distinct cross-sections of the AoA measurement precision distribution maps for the AD pair are presented in Figures 8-10. Red dots represent the positions of active LSs and black dots show locations of inactive LSs. From the maps, it can be seen that the precision significantly depends on the distance from LSs. For the AD pair, located on the shorter room wall, the uncertainty increases along with the distance from LSs. At the bottom corners of the workspace, on the opposite side to the active sensors, the uncertainty is the highest, see Figures 8 and 9. The best precision is identified near the active LSs, which is depicted in Table 2. The precision range is from 150 cm 3 to 6900 cm 3 . The effect of the LSs' deployment on different heights is noticeable in Figure 8c, which illustrates the precision distribution at a distance 1 m from the wall where the active sensors are located.

Precision Model Evaluation
The implementation of the proposed 3D model is done in Matlab 2014b with the Signal Processing, Optimization and Computational Geometry toolboxes. Then the implemented solution is evaluated using a simulated cuboidal test environment of 11.00 m × 7.50 m × 4.00 m size. The space is sampled with a constant step of 50.00 cm in three directions resulting in a test grid of samples. The sampling coordinates located on the border of the workspace, which physically would be placed on the walls, are excluded from the sampling grid.
The RTLS consists of four LSs, two located in the workspace corners on height 4 m and two located on height 3 m, see Table 1. The origin of the coordinate system is arbitrarily located on the floor at the workspace corner under LSA. The calibration point is located approximately in the centre of the workspace, explicitly at 5.60 m × 4.00 m × 1.00 m.
The model is applied to estimate the map of location uncertainty in terms of precision for two pairs of LSs, AB and AD, located on the longer and shorter walls of the test room respectively. For each sampling point, the location precision expressed as a volume is calculated from the azimuth and elevation AoPs. The SEM of azimuth and elevation AoAs for the tested workspace were heuristically determined from results of tests performed on 36 arbitrary selected location points of workspace for all LSs. The heuristically estimated mean SEM values of both azimuth and elevation AoAs' standard deviations were 0.45°. Therefore, the measurement uncertainty in terms of precision of each LS is represented by a cone with vertices in LSs' positions, the axes are defined as the arrival path (Section 5.2) and the circular base with the radius calculated using Equation (13) or (14). The modelled localization precision was determined by using the common volume of two cones, whose axes intersect at the sample location. The localization precision was calculated using the 3D Delaunay triangulation computing method (Section 6.2).
The distribution map of the modelled AoA localization precision for an AD pair is presented in Figure 7. The LSA and LSD are located at slightly different heights of the shorter wall of the workspace, as shown in Table 1. The slices represent orthogonal planes through the volume of the workspace, and the colours correspond to precision levels.
The distinct cross-sections of the AoA measurement precision distribution maps for the AD pair are presented in Figures 8-10. Red dots represent the positions of active LSs and black dots show locations of inactive LSs. From the maps, it can be seen that the precision significantly depends on the distance from LSs. For the AD pair, located on the shorter room wall, the uncertainty increases along with the distance from LSs. At the bottom corners of the workspace, on the opposite side to the active sensors, the uncertainty is the highest, see Figures 8 and 9. The best precision is identified near the active LSs, which is depicted in Table 2. The precision range is from 150 cm 3 to 6900 cm 3 . The effect of the LSs' deployment on different heights is noticeable in Figure 8c, which illustrates the precision distribution at a distance 1 m from the wall where the active sensors are located. Figure 8c shows that the uncertainty level near the floor (z = 0.5 m) is lower around the LSD of approximately 170 cm 3 , compared to the area around the LSA where the uncertainty reaches 270 cm 3 .     For the AB pair, located at the same height of the longer room wall, see Table 2, evaluated AoA precision distribution map, is presented in Figure 11.  For the AB pair, located at the same height of the longer room wall, see Table 2, evaluated AoA precision distribution map, is presented in Figure 11. The specific cross-sections of the localization precision distribution map for the AB pair are presented in Figures 12-14. As for the LS's pair AD, also for the AB pair, the localization precision increases along with the distance from LSs, see Figures 12 and 14. The worst precision of 2650 cm 3 is depicted at the bottom corners most distant from the active LS's AB pair. The best precision equals 20 cm 3 , which is noticed at (10.5, 7, 3.5) and (0.5, 7, 3.5) coordinates near the active LSs, see Figure 14a and Table 2. At the top along the wall between LSA and LSB, the level of precision is relatively higher, because the cones' axes referring to the arrival path could be even parallel, which is shown in Figure  12b.  The specific cross-sections of the localization precision distribution map for the AB pair are presented in Figures 12-14. As for the LS's pair AD, also for the AB pair, the localization precision increases along with the distance from LSs, see Figures 12 and 14. The worst precision of 2650 cm 3 is depicted at the bottom corners most distant from the active LS's AB pair. The best precision equals 20 cm 3 , which is noticed at (10.5, 7, 3.5) and (0.5, 7, 3.5) coordinates near the active LSs, see Figure 14a and Table 2. At the top along the wall between LS A and LS B , the level of precision is relatively higher, because the cones' axes referring to the arrival path could be even parallel, which is shown in Figure 12b. The specific cross-sections of the localization precision distribution map for the AB pair are presented in Figures 12-14. As for the LS's pair AD, also for the AB pair, the localization precision increases along with the distance from LSs, see Figures 12 and 14. The worst precision of 2650 cm 3 is depicted at the bottom corners most distant from the active LS's AB pair. The best precision equals 20 cm 3 , which is noticed at (10.5, 7, 3.5) and (0.5, 7, 3.5) coordinates near the active LSs, see Figure 14a and Table 2. At the top along the wall between LSA and LSB, the level of precision is relatively higher, because the cones' axes referring to the arrival path could be even parallel, which is shown in Figure  12b.

The Test Systems
The real system was implemented on the Ubisense Real Time Location System Series 7000. The used UWB-based RTLS consists of four LSs in a master-slave configuration, see Figure 15a. One of the LSs is assigned as a master, which has two-way communication with a tag in the 2.4 GHz telemetry channel. All LSs, both master and slaves, are able to receive localization pulses on UWB channel 6 GHz-8 GHz from the tag as shown in Figure 15b. Also all the LSs communicate by timing and Ethernet connections. Timing connections are used to synchronize the slaves with the master for TDoA measurement. Via Ethernet, the collected raw data is transmitted between the LSs and the switch. It is also used to provide power supply for the LSs according to PoE standards. The switch is connected with the PC consisting of the location estimation platform Ubisense Location Platform 2.1.

The Test Systems
The real system was implemented on the Ubisense Real Time Location System Series 7000. The used UWB-based RTLS consists of four LSs in a master-slave configuration, see Figure 15a. One of the LSs is assigned as a master, which has two-way communication with a tag in the 2.4 GHz telemetry channel. All LSs, both master and slaves, are able to receive localization pulses on UWB channel 6 GHz-8 GHz from the tag as shown in Figure 15b. Also all the LSs communicate by timing and Ethernet connections. Timing connections are used to synchronize the slaves with the master for TDoA measurement. Via Ethernet, the collected raw data is transmitted between the LSs and the switch. It is also used to provide power supply for the LSs according to PoE standards. The switch is connected with the PC consisting of the location estimation platform Ubisense Location Platform 2.1. The used tags are Ubisense Compact Tags with a maximum tag update rate of 33.75 Hz. The tags attached to the targets communicate with the master on the telemetry channel 2.4 GHz, and send UWB chirps to all LSs. An exemplary structure of UWB-based RTLS is presented in [4]. Each tag sends UWB pulses to all LSs with a defined update rate, which depends on the number of tags in the system. Localization pulses received by each LS are analysed in terms of:  time difference of arrival to the LSs i.e., TDoA;  angles at which the signals are received by the LSs in terms of azimuth and elevation AoAs.
The power of signal, RSS, is used by the system for data filtration. The location estimation platform provides various static and dynamic filters, which improve estimation quality. However, in the following physical experiment, the proposed AoA-based localization algorithm operates on AoA raw measurements without filtration. The Ubisense algorithm is a part of the location estimation platform and it was used in validation. The Ubisense hybrid algorithm estimates the tag location based on AoA and TDoA measurements with static filtering.
The physical experiment was performed in a lecture hall with a size of 11.0 m × 10.0 m × 7.0 m located in the over 100 year old building of Faculty of Electrical and Control Engineering in Gdansk University of Technology, illustrated in Figure 16. However, due to the hall's shape, the RTLS's workspace does not cover the whole hall's space. To cover the whole workspace, two additional LSs would be needed. Therefore, the effective size of the workspace is only 11.0 m × 7.0 m × 4.0 m. In the workspace, two environments can be specified, the stage with the lecture hall rostrum, and the tiered seating with 6 rows of desks along with 12 seats.
In the workspace, nine reference points on three desks were established using an electronic tachymeter. Two reference points were defined at the edges and one in the middle of each desk row. The calibration point located approximately in the centre of the workspace at coordinate (5.59, 3.96, 1.06), in the middle of the second desk row, was also one of the reference points. The used tags are Ubisense Compact Tags with a maximum tag update rate of 33.75 Hz. The tags attached to the targets communicate with the master on the telemetry channel 2.4 GHz, and send UWB chirps to all LSs. An exemplary structure of UWB-based RTLS is presented in [4]. Each tag sends UWB pulses to all LSs with a defined update rate, which depends on the number of tags in the system. Localization pulses received by each LS are analysed in terms of: • time difference of arrival to the LSs i.e., TDoA; • angles at which the signals are received by the LSs in terms of azimuth and elevation AoAs.
The power of signal, RSS, is used by the system for data filtration. The location estimation platform provides various static and dynamic filters, which improve estimation quality. However, in the following physical experiment, the proposed AoA-based localization algorithm operates on AoA raw measurements without filtration. The Ubisense algorithm is a part of the location estimation platform and it was used in validation. The Ubisense hybrid algorithm estimates the tag location based on AoA and TDoA measurements with static filtering.
The physical experiment was performed in a lecture hall with a size of 11.0 m × 10.0 m × 7.0 m located in the over 100 year old building of Faculty of Electrical and Control Engineering in Gdansk University of Technology, illustrated in Figure 16. However, due to the hall's shape, the RTLS's workspace does not cover the whole hall's space. To cover the whole workspace, two additional LSs would be needed. Therefore, the effective size of the workspace is only 11.0 m × 7.0 m × 4.0 m. In the workspace, two environments can be specified, the stage with the lecture hall rostrum, and the tiered seating with 6 rows of desks along with 12 seats. The LSs CD, presented in Figure 16, were installed in the corners of the lecture hall on height 3 m. The two other LSs, A and B, were placed in the middle of sidewall, on height 3.9 m, see Table 1. All LSs were directed to the calibration point. The LSs positions were established using an electronic tachymeter South NTS-372 RC.
Four different tags, as shown in Figure 15b, were successively mounted on a tripod at four adjustable heights of 0 cm, 30 cm, 60 cm, and 90 cm. The measurements were performed on surfaces of the first, third and fifth desk rows, where each desk row has a different height relative to the floor. The tripod was placed successively at all reference points, at nine XY coordinates at four heights. In total, there were 36 spatial location samples with 200 samples at each location of the azimuth and elevation AoAs.

Experimental Verification
The suitability of the proposed systematic approach to the uncertainty, in terms of accuracy and precision of the AoA-based 3D localization, was verified by physical experiments for AD and AB LS pairs. The presented localization precision model was verified by evaluating how the model matches the real measurements for these LS pairs. Likewise, the suggested localization offset error model and effects of the correction vector were verified heuristically. Finally, the performance of the AoA-based 3D localization method, including its enhancement, was compared with the reference RTLS's commercial algorithm results, where the reference localization technique combines the AoA and TDoA localization methods using all LSs.

Precision Model Verification
To verify the localization precision model, the simulation results of the proposed geometrical model of AoA localization in a 3D indoor space were compared with the results of physical experiments. The matching ratio, as a percentage of the experimental location estimates occurring inside the theoretical solid from the model, is used as a quantitative measure of how the precision model fits the reality. The matching ratio was determined at each of the 36 spatial location samples in the workspace, and an example is shown in Figure 17.
Cumulative distribution functions of matching ratios at 36 spatial location samples for LSs AB and AD are presented in Figure 18. The matching ratio for the pair AB, varies from 55% to 94% and the average value of matching ratio for these 36 spatial location samples is 74.6%. The cumulative distribution function for the pair AD located on the shorter side of the workspace shows that the matching ratio varies from 41% to 91%, and the average value of matching ratio for the 36 spatial location samples is 68.4%. The AB pair of LSs placed on the longer side of the workspace shows better performance and even better fitting of the model to the real measurements. Moreover, for the 50% test points, the matching ratio was bigger than 68% for the AD pair and bigger than 75% for the AB pair of LSs. The cumulative distribution functions shown in Figure 18 verify that the results of the theoretical model and experiments are consistent. In the workspace, nine reference points on three desks were established using an electronic tachymeter. Two reference points were defined at the edges and one in the middle of each desk row. The calibration point located approximately in the centre of the workspace at coordinate (5.59, 3.96, 1.06), in the middle of the second desk row, was also one of the reference points.
The LSs CD, presented in Figure 16, were installed in the corners of the lecture hall on height 3 m. The two other LSs, A and B, were placed in the middle of sidewall, on height 3.9 m, see Table 1. All LSs were directed to the calibration point. The LSs positions were established using an electronic tachymeter South NTS-372 RC.
Four different tags, as shown in Figure 15b, were successively mounted on a tripod at four adjustable heights of 0 cm, 30 cm, 60 cm, and 90 cm. The measurements were performed on surfaces of the first, third and fifth desk rows, where each desk row has a different height relative to the floor. The tripod was placed successively at all reference points, at nine XY coordinates at four heights. In total, there were 36 spatial location samples with 200 samples at each location of the azimuth and elevation AoAs.

Experimental Verification
The suitability of the proposed systematic approach to the uncertainty, in terms of accuracy and precision of the AoA-based 3D localization, was verified by physical experiments for AD and AB LS pairs. The presented localization precision model was verified by evaluating how the model matches the real measurements for these LS pairs. Likewise, the suggested localization offset error model and effects of the correction vector were verified heuristically. Finally, the performance of the AoA-based 3D localization method, including its enhancement, was compared with the reference RTLS's commercial algorithm results, where the reference localization technique combines the AoA and TDoA localization methods using all LSs.

Precision Model Verification
To verify the localization precision model, the simulation results of the proposed geometrical model of AoA localization in a 3D indoor space were compared with the results of physical experiments. The matching ratio, as a percentage of the experimental location estimates occurring inside the theoretical solid from the model, is used as a quantitative measure of how the precision model fits the reality. The matching ratio was determined at each of the 36 spatial location samples in the workspace, and an example is shown in Figure 17.

Validation of Localization Offset Error Approach
The validation of the proposed localization offset error approach is based on an analysis of the tags' locations estimated using the AoA-based localization algorithm at the 36 spatial location samples in the test environment for the AB and AD LSs pairs. At each spatial location sample with known coordinates, each tag's location was estimated from 200 samples. Then, the average offset error of x, y and z components and the resultant average offset error of the location system in the tested environment were computed using Equations (1) and (2) and are shown in Tables 3 and 4 for AB and AD pairs, respectively. The estimated average offset error of the x, y and z components defined a correction vector expressed by Equation (12) and calculated using Equation (11). The correction vector was applied to each of the 36 spatial location samples, by subtracting the vector's coordinates from the estimated average x, y and z localization coordinates. As result of applying the correction vector, the mean offset error components for these 36 spatial location samples were reset to zero, see Tables 3 and 4.
To judge the correction effect, the new estimated localizations were compared with the reference RTLS's localization results as shown in Tables 3 and 4 for AB and AD LSs pairs respectively. The reference results were obtained using the commercial hybrid algorithm provided by Ubisense, which estimated the tag's location based on TDoA measurements from four LSs [4]. Cumulative distribution functions of matching ratios at 36 spatial location samples for LSs AB and AD are presented in Figure 18. The matching ratio for the pair AB, varies from 55% to 94% and the average value of matching ratio for these 36 spatial location samples is 74.6%. The cumulative distribution function for the pair AD located on the shorter side of the workspace shows that the matching ratio varies from 41% to 91%, and the average value of matching ratio for the 36 spatial location samples is 68.4%. The AB pair of LSs placed on the longer side of the workspace shows better performance and even better fitting of the model to the real measurements. Moreover, for the 50% test points, the matching ratio was bigger than 68% for the AD pair and bigger than 75% for the AB pair of LSs. The cumulative distribution functions shown in Figure 18 verify that the results of the theoretical model and experiments are consistent.

Validation of Localization Offset Error Approach
The validation of the proposed localization offset error approach is based on an analysis of the tags' locations estimated using the AoA-based localization algorithm at the 36 spatial location samples in the test environment for the AB and AD LSs pairs. At each spatial location sample with known coordinates, each tag's location was estimated from 200 samples. Then, the average offset error of x, y and z components and the resultant average offset error of the location system in the tested environment were computed using Equations (1) and (2) and are shown in Tables 3 and 4 for AB and AD pairs, respectively. The estimated average offset error of the x, y and z components defined a correction vector expressed by Equation (12) and calculated using Equation (11). The correction vector was applied to each of the 36 spatial location samples, by subtracting the vector's coordinates from the estimated average x, y and z localization coordinates. As result of applying the correction vector, the mean offset error components for these 36 spatial location samples were reset to zero, see Tables 3 and 4.
To judge the correction effect, the new estimated localizations were compared with the reference RTLS's localization results as shown in Tables 3 and 4 for AB and AD LSs pairs

Validation of Localization Offset Error Approach
The validation of the proposed localization offset error approach is based on an analysis of the tags' locations estimated using the AoA-based localization algorithm at the 36 spatial location samples in the test environment for the AB and AD LSs pairs. At each spatial location sample with known coordinates, each tag's location was estimated from 200 samples. Then, the average offset error of x, y and z components and the resultant average offset error of the location system in the tested environment were computed using Equations (1) and (2) and are shown in Tables 3 and 4 for AB and AD pairs, respectively. The estimated average offset error of the x, y and z components defined a correction vector expressed by Equation (12) and calculated using Equation (11). The correction vector was applied to each of the 36 spatial location samples, by subtracting the vector's coordinates from the estimated average x, y and z localization coordinates. As result of applying the correction vector, the mean offset error components for these 36 spatial location samples were reset to zero, see Tables 3 and 4. Table 3. Characteristics of the experimental results of the offset error for the 36 spatial location samples for the AoA-based localization algorithm before and after correction and the reference algorithm for LS's AB pair.  To judge the correction effect, the new estimated localizations were compared with the reference RTLS's localization results as shown in Tables 3 and 4 for AB and AD LSs pairs respectively. The reference results were obtained using the commercial hybrid algorithm provided by Ubisense, which estimated the tag's location based on TDoA measurements from four LSs [4].

AB Pair Case Study
The exemplary z offset error component, before and after applying the correction vector in each spatial location sample, is compared with the corresponding component from the reference system, see Figure 19. The resultant location offset errors, which are the modules of the relevant offset error vector are shown in Figure 20. After applying the correction vector, the mean resultant offset error for the AoA-based localization algorithm is reduced 43.8% from 55.5 cm with SD of 15.6 cm to 31.2 cm with SD of 13.9 cm see Table 3. For a comparison, the mean resultant offset error determined by the reference algorithm was 32.8 cm with SD of 12.2 cm. Moreover, the correction vector significantly reduces the minimum and maximum values of the resultant offset error by 19.3 cm and 26.1 cm respectively, which means 75.4% and 29.7% respectively. For a comparison, the range of resultant offset error determined by the reference algorithm was from 8.3 cm to 66.8 cm.
The presented data for the AB pair shows that for both localization algorithms, the z component of the offset error was biggest compared to x and y components, see Table 3. For the AoA-based localization algorithm without correction vector, z component's mean value was −32.7 cm and standard deviation, SD, 13.4 cm, when for the reference algorithm z component's mean value and SD were 20.7 cm and 14.5 cm respectively. For this LSs pair, the x component has the least impact on the resultant offset error. For both algorithms, the mean offset error x component was almost a half of z component.
vector are shown in Figure 20. After applying the correction vector, the mean resultant offset error for the AoA-based localization algorithm is reduced 43.8% from 55.5 cm with SD of 15.6 cm to 31.2 cm with SD of 13.9 cm see Table 3. For a comparison, the mean resultant offset error determined by the reference algorithm was 32.8 cm with SD of 12.2 cm. Moreover, the correction vector significantly reduces the minimum and maximum values of the resultant offset error by 19.3 cm and 26.1 cm respectively, which means 75.4% and 29.7% respectively. For a comparison, the range of resultant offset error determined by the reference algorithm was from 8.3 cm to 66.8 cm.  The presented data for the AB pair shows that for both localization algorithms, the z component of the offset error was biggest compared to x and y components, see Table 3. For the AoA-based localization algorithm without correction vector, z component's mean value was −32.7 cm and standard deviation, SD, 13.4 cm, when for the reference algorithm z component's mean value and SD were 20.7 cm and 14.5 cm respectively. For this LSs pair, the x component has the least impact on the resultant offset error. For both algorithms, the mean offset error x component was almost a half of z component.
The cumulative distribution functions of average offset errors from tests of AoA-based localization method before and after correction along with the reference method are presented in Figure 21. The presented plots show how the correction vector influences the average offset error. In a case the AoA-based localization algorithm without correction, the range of the error is from 25 cm to 87 cm and the median of the average offset error is 55 cm. The correction vector significantly shifts the distribution function to the left to the range from 6.3 cm to 61.8 cm with a median of 30 cm. For 80% of test locations, the average offset error, after applying the correction vector, is less than 40 cm. The z offset error components before and after applying the correction vector at each spatial location sample are compared in Figure 22, and the resultant location offset errors are shown in The cumulative distribution functions of average offset errors from tests of AoA-based localization method before and after correction along with the reference method are presented in Figure 21. The presented plots show how the correction vector influences the average offset error. In a case the AoA-based localization algorithm without correction, the range of the error is from 25 cm to 87 cm and the median of the average offset error is 55 cm. The correction vector significantly shifts the distribution function to the left to the range from 6.3 cm to 61.8 cm with a median of 30 cm. For 80% of test locations, the average offset error, after applying the correction vector, is less than 40 cm. The presented data for the AB pair shows that for both localization algorithms, the z component of the offset error was biggest compared to x and y components, see Table 3. For the AoA-based localization algorithm without correction vector, z component's mean value was −32.7 cm and standard deviation, SD, 13.4 cm, when for the reference algorithm z component's mean value and SD were 20.7 cm and 14.5 cm respectively. For this LSs pair, the x component has the least impact on the resultant offset error. For both algorithms, the mean offset error x component was almost a half of z component.
The cumulative distribution functions of average offset errors from tests of AoA-based localization method before and after correction along with the reference method are presented in Figure 21. The presented plots show how the correction vector influences the average offset error. In a case the AoA-based localization algorithm without correction, the range of the error is from 25 cm to 87 cm and the median of the average offset error is 55 cm. The correction vector significantly shifts the distribution function to the left to the range from 6.3 cm to 61.8 cm with a median of 30 cm. For 80% of test locations, the average offset error, after applying the correction vector, is less than 40 cm.

AD Pair Case Study
The z offset error components before and after applying the correction vector at each spatial location sample are compared in Figure 22, and the resultant location offset errors are shown in Figure 23. It shows that the correction vector reduced the location offset errors at most of the examined positions, and the average offset error of these 36 locations is reduced 55.6% from 64.0 cm to 28.4 cm, see Table 3. However, the SD of mean offset error increased from 8.9 cm to 17.1 cm. For a

AD Pair Case Study
The z offset error components before and after applying the correction vector at each spatial location sample are compared in Figure 22, and the resultant location offset errors are shown in Figure 23. It shows that the correction vector reduced the location offset errors at most of the examined positions, and the average offset error of these 36 locations is reduced 55.6% from 64.0 cm to 28.4 cm, see Table 3. However, the SD of mean offset error increased from 8.9 cm to 17.1 cm. For a comparison, the mean resultant offset error determined by the reference algorithm was 32.8 cm with the SD of 12.2 cm. Moreover, the correction vector significantly reduces the minimum and maximum values of the resultant offset error by 39.7 cm and 7.6 cm respectively to the range from 3.5 cm to 70.7 cm, what means improvement of 91.9% and 9.7% respectively. For a comparison, the range of resultant offset error determined by the reference algorithm was from 8.3 cm to 66.8 cm.   The cumulative distribution functions of the average offset errors of the AoA-based localization method before and after correction along with the reference method results for the 36 spatial location samples are presented in Figure 24. The presented distribution functions clearly illustrate how the correction vector influences the average offset error. For the results from the AoA-based localization  The presented data for AD LSs pair show that alike for the AB LSs pair, the z component of the offset error was the biggest, compared to x and y components. For AoA-based localization algorithm without the correction vector, z component's mean value was −38.1 cm with a SD of 18.6 cm. When for the reference method, z component's mean value was 20.7 cm with a SD of 14.5 cm. The y component with the mean value −24.7 cm with a SD of 23.9 cm is the smallest of the three components. However, the SD of this component is relatively high compared to the x and z components.  The cumulative distribution functions of the average offset errors of the AoA-based localization method before and after correction along with the reference method results for the 36 spatial location samples are presented in Figure 24. The presented distribution functions clearly illustrate how the correction vector influences the average offset error. For the results from the AoA-based localization The presented data for AD LSs pair show that alike for the AB LSs pair, the z component of the offset error was the biggest, compared to x and y components. For AoA-based localization algorithm without the correction vector, z component's mean value was −38.1 cm with a SD of 18.6 cm. When for the reference method, z component's mean value was 20.7 cm with a SD of 14.5 cm. The y component with the mean value −24.7 cm with a SD of 23.9 cm is the smallest of the three components. However, the SD of this component is relatively high compared to the x and z components.
The cumulative distribution functions of the average offset errors of the AoA-based localization method before and after correction along with the reference method results for the 36 spatial location samples are presented in Figure 24. The presented distribution functions clearly illustrate how the correction vector influences the average offset error. For the results from the AoA-based localization algorithm without the correction vector, the median of the average offset error is 60 cm, whereas the range of the error is from 42 cm to 82 cm. The correction vector significantly shifts the distribution function to the left and the median of average offset error is reduced 63.3% to 22 cm. For 80% of the test locations, the average offset error is less than 40 cm.

Results Discussion
The simulation results for two LS pairs AD and AB shown in Figures 7-14 indicate that the localization uncertainty, in terms of precision, depends on the LS's configuration in the workspace. The precision distribution maps demonstrate how the uncertainty increases along with the distance from LSs; the uncertainty is worst at the bottom corners of the side opposite to the side with the active LSs, which is summarized in Table 2.
The Table 2 points out that the best precision is identified near the active LSs. The simulation results indicate also how different deployment heights of active LSs influence the uncertainty maps. For instance, Figure 8c shows that the location uncertainty near the floor is significantly lower under the LSD, which is located lower than the LSA. The simulation results of the LSs AB pair placed at the same height show a relatively high uncertainty at the middle top along the wall between LSA and LSB, see Figure 12b. The reason for this phenomenon is that in this area, the volume of the common solid of the two crossing cones is relatively big since their axes referring to the paths of arrival could be almost coaxial. However, the cones are not coaxial due to the established 50 cm localisation dead zone near the wall. To overcome a problem of bad uncertainty-precision near the wall, it can be suggested to arrange the active LSs at different heights.
The simulated uncertainty maps for the AB and AD LS pairs depict the advantage of the AB pair, which provide the localization precision in a range from 20 cm 3 to 2650 cm 3 compared to AD pair's a range from 150 cm 3 to 6900 cm 3 , see Table 1. The verification of this observation by the experimental results confirms that the best localization precision is achieved for the LSs AB pair and consequently for AD pair, the average value of matching ratio for the 36 spatial location samples is 74.6% compared to 68.4% for the LSs AD pair.
The customization verification proves a positive influence of the correction vector on localization accuracy. In the given test environment with 36 test points, for LSs AB pair, the correction vector reduces 55% the mean offset error from 55 cm to 31 cm and from 64 cm to 28 cm for AD pair, see Tables 3 and 4. Also for the AB pair the ranges of the offset error at these 36 test points have been diminished of 19.3 cm and 26.1 cm for lower and upper range limits respectively, from 25.6 cm and 87.9 cm to 6.3 cm and 61.8 cm respectively. The customization results challenges the mean offset error value of the reference algorithm of 32 cm, and even its range limits of 8.3 cm and 66.8 cm.
To comprehensively assess the correction vector's effect, the estimated localizations' accuracy without and with the applied correction vector are compared with the reference RTLS's results for LSs AB and AD pairs, shown in the Figures 21 and 24, respectively. The figures clearly indicate

Results Discussion
The simulation results for two LS pairs AD and AB shown in Figures 7-14 indicate that the localization uncertainty, in terms of precision, depends on the LS's configuration in the workspace. The precision distribution maps demonstrate how the uncertainty increases along with the distance from LSs; the uncertainty is worst at the bottom corners of the side opposite to the side with the active LSs, which is summarized in Table 2.
The Table 2 points out that the best precision is identified near the active LSs. The simulation results indicate also how different deployment heights of active LSs influence the uncertainty maps. For instance, Figure 8c shows that the location uncertainty near the floor is significantly lower under the LS D , which is located lower than the LS A . The simulation results of the LSs AB pair placed at the same height show a relatively high uncertainty at the middle top along the wall between LS A and LS B , see Figure 12b. The reason for this phenomenon is that in this area, the volume of the common solid of the two crossing cones is relatively big since their axes referring to the paths of arrival could be almost coaxial. However, the cones are not coaxial due to the established 50 cm localisation dead zone near the wall. To overcome a problem of bad uncertainty-precision near the wall, it can be suggested to arrange the active LSs at different heights.
The simulated uncertainty maps for the AB and AD LS pairs depict the advantage of the AB pair, which provide the localization precision in a range from 20 cm 3 to 2650 cm 3 compared to AD pair's a range from 150 cm 3 to 6900 cm 3 , see Table 1. The verification of this observation by the experimental results confirms that the best localization precision is achieved for the LSs AB pair and consequently for AD pair, the average value of matching ratio for the 36 spatial location samples is 74.6% compared to 68.4% for the LSs AD pair.
The customization verification proves a positive influence of the correction vector on localization accuracy. In the given test environment with 36 test points, for LSs AB pair, the correction vector reduces 55% the mean offset error from 55 cm to 31 cm and from 64 cm to 28 cm for AD pair, see Tables 3 and 4. Also for the AB pair the ranges of the offset error at these 36 test points have been diminished of 19.3 cm and 26.1 cm for lower and upper range limits respectively, from 25.6 cm and 87.9 cm to 6.3 cm and 61.8 cm respectively. The customization results challenges the mean offset error value of the reference algorithm of 32 cm, and even its range limits of 8.3 cm and 66.8 cm.
To comprehensively assess the correction vector's effect, the estimated localizations' accuracy without and with the applied correction vector are compared with the reference RTLS's results for LSs AB and AD pairs, shown in the Figures 21 and 24, respectively. The figures clearly indicate improvement of the accuracy after applying the correction vector, which vitally moves the cumulative distribution curves towards the lower value of the offset error. Considering both LS configurations, after applying the correction vector, a half of the test locations, the offset error is less than 30 cm and 22 cm for AB and AD pairs respectively, compared to 31 cm for the reference algorithm. One can see that the correction vector improves the accuracy of the AoA method in a way that it challenges the reference method. Similarities in shape of all cumulative distribution functions, including the reference one, can indirectly validate the presented approach.

Conclusions and Future Work
Due to its applicability and complexity, discovering a trade-off among different features of indoor localization systems working in a 3D environment is an important research subject. The proposed approach investigates the performance in terms of the localization uncertainty of AoA-based UWB-based RTLS's. The improvement of localization accuracy and precision of the RTLS's, without compromising its simplicity and price has been achieved by means of the system customization. The proposed analytical geometrical uncertainty model of the AoA localization method in a 3D indoor space is the concept's foundation of the analytical customization method. The customization is based on the performance assessment in a given working environment.
A 50% improvement of system localization accuracy is gained by applying a correction vector, which is heuristically defined from an analysis of the system's 3D accuracy distribution map of the given working space. The enhanced performance of the AoA-based UWB-based RTLS challenges the performance of the reference hybrid TDoA methods supported by AoA technology, whereas the proposed method excels the reference one in terms of simplicity and price. The experimental results prove that the correction vector is the suitable customization, which reduces the localization offset error caused by the variety of the system's architecture and calibration process, and by the tags' and working environments' heterogeneity.
Another introduced customization approach considers the system's performance in terms of precision in respect to the system's configuration in the given working space. The system's performance analysis for different LSs configuration was done for two different LSs pairs and for different LSs' height placement in the space of the lecture hall. The results show a significant difference in precision, up to 7.5 times for its lower limit and 2.6 times for its upper limit, for the two considered configurations. Furthermore, the analysis indicates also a disadvantage of placing the active LSs at the same height. Moreover, the simulated precision distribution maps define the areas of the best and worst localization precision, in such a manner that the best performance is noticeably near to the active LSs and the worst are at the corners hindmost from these LSs.
The angular-based 3D localization algorithm estimating the tag's location using azimuth and elevation angle measurements of a pair of LSs is proposed. The extrapolation algorithm allows finding the localisation estimate even in contaminated environments by using the principle of a distance between two skewed lines. Simulation and physical experiment results confirm that the proposed simple extrapolation angular-based 3D localization algorithm ensures a good localization performance and challenges the advanced UWB-based RTLS algorithms.
The proposed analytical geometrical model of the AoA localization method in a 3D indoor space was evaluated in the simulation environment of Matlab where the model was implemented. The proposed solution was verified by comparison of simulation and physical experiment results. The quantitative verification, in a form of matching ratios confirms that the analytical model matches the real measurement with a high probability level.
To further enhance the RTLS performance, the research may consider a region-based correction vector method, which adjusts the correction vector to the region of workspace. The distance from the active LSs can be used as an adaptive factor of the correction vector. The artificial intelligent approach, such as fuzzy logic or machine learning, may be implemented for estimation of regions' boundaries and relevant suitable correction vectors. Additionally, the uncertainty analysis of the UWB LS's array geometry used in the AoA-based RTLSs may provide guidance on how to enhance the estimation of the correction vectors.
Moreover, a similar localization uncertainty analysis can be applied to ToA and TDoA-based localization algorithms used in RTLSs. An analogical uncertainty model, including offset error sources of RTLS's architecture, indoor environment and synchronization procedure, can be defined to enhance the system's performance.