Analysis of GPS and UWB positioning system for athlete tracking

In recent years, wearable performance monitoring systems have become increasingly popular in competitive sports. Wearable devices can provide vital information including distance covered, velocity, change of direction, and acceleration, which can be used to improve athlete performance and prevent injuries. Tracking technology that monitors the movement of an athlete is an important element of sport wearable devices. For tracking, the cheapest option is to use global positioning system (GPS) data however, their large margins of error are a major concern in many sports. Consequently, indoor positioning systems (IPS) have become popular in sports in recent years where the ultra-wideband (UWB) positioning sensor is now being used for tracking. IPS promises much higher accuracy, but unlike GPS, it requires a longer set-up time and its costs are significantly more. In this research, we investigate the suitability of the UWB-based localisation technique for wearable sports performance monitoring systems. We implemented a hardware set-up for both positioning sensors, UWB and the GPS-based (both 10 Hz and 1 Hz) localisation systems, and then monitored their accuracy in 2D and 3D side-byside for the sport of tennis. Our gathered data shows a major drawback in the UWB-based localisation system. To address this major drawback we introduce an artificial intelligent model, which shows some promising results.


Introduction
In recent years, transportation and logistics have been the main consumer of positioning information. The global positioning system (GPS) has been a dominating positioning technology, where it has enjoyed enormous popularity over many years. Recently the demand for accurate positioning information has been on the rise, fueled by the emergence of applications in robotics, automation, and sports. Applications in these areas require position accuracy within centimeters, which can not be achieved in a traditional global position system. An alternate to the GPS is indoor positioning system (IPS) where ultra-wideband (UWB) is widely used.
One area where accurate positioning is very crucial is in sports wearable technology. These systems are commonly referred to as position tracking systems or electronic performance tracking systems (EPTS). The market for wearable devices in sports continues to grow [1], where there is exponential growth in research related to position tracking systems [2].
The international football governing body FIFA has allowed the use of these devices during matches [3] in July 2019. The International Tennis Federation (ITF) has also allowed the use of these devices [4]. EPTS is emerging as a better alternate of vision or camera-based athlete tracking system where many companies offer such solutions [5][6][7]. Vision-based, motion capture camera systems [8,9], and [10] can be used as well but their setup time, complexity and cost are very high and require complex algorithms to calculate the distance travelled and speed. Vision-based positioning techniques also require a powerful computational platform [11,12]. They also suffer from light conditions and scalability problems [13].
Wearable devices can provide important information such as speed, acceleration, change of direction, and running pattern which can be used by sports scientists to measure the amount of stress a player puts on a particular section of his/her body [14,15]. This can prove very important in preventing injuries. Information provided by wearable devices can also be used by coaches to develop better plans and improve athletes' on-field performance.
Among all other technologies, athlete tracking plays one of the most significant roles for wearable devices in sports. Athlete tracking is different from traditional tracking used in rigid bodies such as vehicles, and aircraft [16,17]. Humans have flexible bodies that can move abruptly in different directions, making athlete tracking highly challenging. Micro-electro-mechanical system (MEMS) based sensors such as accelerometer, gyroscope, magnetometer are widely used for rigid body tracking [18,19]. However, for athlete tracking, existing wearable MEMS-based systems have been found to produce too much noise [20] contributing to a higher margin of positioning error. Consequently, the widespread consensus has been to use anchor-based localisation techniques (i.e, GPS or indoor localisation system) for athlete tracking.
GPS has two major disadvantages that make the IPS more attractive compared to a GPS-based positioning system. First, the GPS often does not work indoor. Basketball, Volleyball, Netball, and many other sports are played indoor where GPS-based systems cannot be reliably used. In some outdoor sports, training sessions are held indoors. Again, it limits the use of GPS for player tracking. Similarly, sports like tennis can be played indoor as well as outdoor. Unlike GPS this is not a limitation for the IPS [21]. IPS can be used both outdoor and indoor. Second, due to the distance between GPS satellites and receivers, GPS has large margins of error [22,23] and its accuracy is within meters. This error is considered negligible for tracking the motion of large objects like cars, aeroplanes, or ships. Cars/ships are rigid bodies and have smooth motion, but the human body is flexible and can make abrupt turns and twists. This adds noise and player movement on a tennis field will be very different from a car travelling on a road. Authors in Refs. [22,23] have found that GPS reliability and validity reduce during short but high speed running or during the rapid change of direction. Authors in Ref. [24] question the reliability of GPS in sports when movements involving minor horizontal displacement are considered.
Besides these major limitations, the availability of satellites and tall infrastructure in close vicinity can cause the signal to attenuate. Due to these limitations, GPS accuracy degrades, where its use is often limited to outdoors only. As mentioned earlier, MEMS-based inertial sensors can be added to increase the accuracy as they have a higher update rate. However, these sensors generate more noise when attached to a flexible human body. As position data becomes inaccurate, factors like speed or distance travelled, or any other factor calculated from the positioning data becomes unreliable. This is also evident when we conducted a field test for measuring the change of direction of players during trials [20,25].
Due to low positioning accuracy [26,27], and [28] used Bayesian filters to increase the accuracy of GPS for tracking. Sports scientists often prefer GPS with higher refresh rates. The 10 Hz GPS [29,30] is now being used in many performance tracking systems. This paper compares the conventional 1 Hz GPS, 10 Hz GPS, and UWB positioning systems in two dimensions (2D) as well as in three dimensions (3D). Analysing the nature of the error is beneficial in the design process of any positioning/localisation algorithm, similar to the Bayesian filters.
Commercially available UWB systems claim a positioning accuracy of 10 cm. Our findings in this paper show that this accuracy is only achieved in the centre of the field. The positioning accuracy of UWB systems decreases to about half a meter in 3D localisation.
Following are the major contributions of this paper.
This paper reports the maximum accuracy of the UWB and the 10 Hz GPS-based positioning system, conventional 1 Hz GPS is also analysed, side-by-side for a representative sport that is played both indoor and outdoor. Owing to our hardware-based experiments and measurements, this paper for the first time reports and quantifies a major drawback of the UWB positioning system. Our findings suggest that the UWB positioning system does not perform well when the tag start to move away from the centre area. This paper then introduces a possible solution using machine learning to address the limitation of the UWB positioning system.
The rest of the paper is organised as follows. First, the literature review is presented in Section II. In Section III, a low-cost positioning hardware is introduced and an algorithm is proposed. In Section IV, a UWB-based positioning system is first compared against a GPS-based positioning system, and then the impacts of the number of anchors and the position of tags are analysed. In Section V, the proposed algorithm is compared against a traditional positioning algorithm and the commercially available Pozyx algorithm. In Section VI, the positioning accuracy is evaluated under dynamic conditions on a tennis court. In Section VII, we present a machine learning-based approach to further improve the accuracy.

Literature review
Performance tracking systems have experienced exponential growth [31]. Authors in Ref. [32], used UWB for localisation in tennis. The authors analysed optical tracking system and recommended RF-based positioning solution to be more suitable for localisation. Whether in the sports of tennis, football, soccer, or basketball clubs have spent a large sum of money to ensure the best performance of their team. Authors in Ref. [33] have presented a method to monitor training load of players in tennis. Using a high accuracy EPTS, coaches can have a better understanding of athlete's movement. Authors in Ref. [34] have discussed current technologies in tennis and their application. Authors in Ref. [35], proposed a system to classify events on a tennis court using audio and video data. Using three inertial measurement units, the authors in Ref. [36] have proposed a system for tracking player movement during a tennis match. One system to analyse a tennis serve using wearable motion sensors was presented by authors in Ref. [37]. Commercially available EPTS technologies are often placed in the pocket of a jersey worn by a player [38,39]. Generally, the pocket is located at the back of the player between the shoulder blades. These devices calculate player workload. This replaced the tiresome job of setting up cameras and video recording of athlete movements [39]. Ralph Lauren introduced an on-court wearable technology [40]. Hawk-eye tracks a player's feet position and is used by coaches and players to better analyse a match [41].
An IPS consists of anchors and tags. Anchors are static devices with fixed known positions, while tags are remote devices placed on a moving body whose position needs to be determined. The position is inferred using a suitable positioning algorithm and measurement technique. Measurement can be done using the angle of arrival (AOA) [42], received signal strength (RSS) [43] or time of arrival (TOA) [44]. In GPS, satellites act as anchors to provide positioning information with accuracy in meters.
Localisation should be reliable, robust, and acceptable to the user [45]. Authors in Ref. [46] have used a TOA algorithm for personal localisation in coal mines. Authors in Ref. [47] have used the AoA and time difference of arrival (TDOA) algorithms to develop a UWB-based positioning system for tracking activity in an indoor construction project. Using Ubisense, authors in Ref. [48] provided cinematic information for evaluating the performance of a player. Authors in Ref. [49] have designed a device-free, UWB-based positioning system for tracking people in the building. Considering the delays due to multipath and non-line-of-sight (NLOS), authors in Ref. [50] proposed a novel approach for UWB calibration. Authors in Refs. [51,52] used round trip time of UWB signals while authors in Refs. [53,54] used ultrasonic signals. Authors in Ref. [55] proposed a chirp spread spectrum. Authors in Ref. [56] used a heuristic approach for improving accuracy using TDOA. Authors in Ref. [57] combined two algorithms, TDOA and AOA, to achieve better localisation.
Due to the high accuracy of the UWB positioning system, it is also used as a benchmark for other positioning systems [58]. UWB positioning is used along with data fusion to increase the accuracy of a human tracking system [59]. UWB positioning is also used for indoor robot tracking [60]. The indoor mapping system to extract the round trip time using UWB has been presented by the authors in Ref. [61]. Authors in Ref. [62] presented an UWB-based positioning system that assists people living with physical disabilities in their routine activities. In Ref. [63] the authors used floor plan data and maximum likelihood to improve accuracy. A similar system using UWB for real-time bus tracking and parking in the specified parking area is developed in Ref. [64].
Authors in Ref. [65] used a combination of UWB and MEMS inertial sensors to improve navigation and positioning. Authors in Ref. [66] demonstrated that short transmitted pulses using UWB in an indoor environment increases accuracy in a multipath environment. Authors in Ref. [67] presented a device-free, human detection, and ranging system using UWB via detecting minor variations in frequency caused by humans. Authors in Ref. [68] integrated GPS and UWB technology for indoor and outdoor location tracking in hospitals. From the above discussion, it can be concluded that UWB is widely used in positioning applications. But in sports, due to set-up time and cost, GPS is widely used. In this paper, both systems are analysed for sport applications.

Proposed algorithm and hardware implementation
For calculating the tag's position using a trilateration algorithm the position coordinates of at least three anchors are required. In GPS, the satellites' coordinates are known, and they provide distance information. In UWB, the anchors' coordinates are known and the distance information between the anchors and the tag is calculated. The prime constraint in implementing the trilateration algorithm accurately is calculating the exact distance between the tag and the anchors. Error in calculating the distance between the anchors and the tag is the main factor affecting the position accuracy. Fig. 1a shows an ideal condition for implementing the trilateration algorithm where three circles intersect accurately at only one point. In practice, there is some error in calculating the distance and due to this error the accuracy of positioning data degrades. Fig. 1b, c, and 1d present three cases where positioning errors are evident. In all the cases, due to the inaccurate distance measurement, circles either overlap or they do not intersect at all. Fig. 1b shows no circles intersect with each other, trilateration can not be implemented in this case. Fig. 1c shows anchor 3 completely overlaps anchor 1 but, no intersection between anchor 2 and 3, trilateration can not be implemented in this case either. Fig. 1d shows a large intersection area among the anchors, trilateration can be implemented but accuracy will be less. Fig. 1d is a common reason for inaccuracy in implementing trilateration. This is a limitation for UWB positioning system.
In the UWB positioning system, a UWB signal is sent from the tag to the anchor, which then sends the signal back to the tag. The total propagation time is calculated and based on this time information, the distance between the two devices (the anchors and tag) is calculated as shown in Fig. 2. While propagating, this UWB signal suffers from multipath, reflections, and noise. It ultimately results in positioning inaccuracy.

Selective multilateration algorithm
The position is calculated using trilateration, based on the distance information (d) acquired from the anchors. Three anchors (e.g., anchor 1, anchor 3, and anchor 4) were placed at the corners, represented by the yellow, green, and red colour respectively as shown in Fig. 2. The tag measures the distance (between anchor and tag) and using trilateration the tag determines the actual coordinates. At any instance, the reading from an anchor might be obstructed, where a clear line of sight is not available. In such cases, the distance information from additional anchors is useful in determining the coordinates of the tag.
In this work, we propose a selective multilateration algorithm that exploits the availability of additional anchors for accurate positioning. The equation for calculating the distance can be given as follows: where A denotes the anchor number on the field, d A is the distance  between the anchor A and the tag. C is the speed at which the radio waves propagate (speed of light) and t is the travel time. For 2D positioning, we only deal with ðx; yÞ coordinates of the anchors and tag, while for 3D positioning, we include a third dimension of z (height) as well. For 3D positioning, we require ðx; y; zÞ coordinates of both the anchors and tag. Equations below are for 3D positioning, removing the z component, these equations can be used for 2D positioning as well. For 3D positioning, the distance d A between an anchor A and a tag can be obtained from Equation (1).
where ðx A ; y A ; z A Þ is the coordinate of an anchor A, and ðx; y; zÞ is the coordinate of the tag. With four anchors A 2 ½1::4, from Equation (2), we can have: Alternatively, Equations (3)-(5) can be presented as: Algorithm 1. Algorithm for Trilateration in 2D In Equations (6) and (7), X is column vector ðx; y; zÞ T representing the calculated coordinates of the tag. M is a 3 Â 3 matrix presented in Equation (8), and N is a column vector presented in Equation (9).
In the Equation (7), we can add distance information for additional anchors to determine the coordinates of the tag. Algorithm for implementation of the above equations is presented in Algorithm 1 for 2D positioning and Algorithm 3 for 3D positioning. Consequently, the following factors are also shown to impact positioning accuracy: Number of Anchors. Position and geometry of the anchors around the tag. Anchors along a straight line are not beneficial for positioning. Distance between the anchor and the tag.
The greater the distance between the anchor and the tag, the less accurate is the measured distance (between anchor and tag) and vice versa. Initially, we find the anchors closest to the tag. From the measured distance (d 1 to d 6 ) between the anchors and the tag, we select the 4 anchors closest to the tag. D 1 is assigned to the shortest distance between the anchor and the tag, as shown in Algorithm 2 for selective multilateration in 2D positioning and Algorithm 4 for selective multilateration in 3D positioning. After D 1 , then D 2 , D 3 , and D 4 are the anchors closest to the tag, respectively. The selected anchors are divided into three groups (T 123 , T 124 , and T 134 ) and the position coordinates of these three groups are calculated. Then, the centroid of these three sets of coordinates is computed. Fig. 3 shows a low cost tag/anchor which we have developed using a Decawave UWB sensor (DWM1000) and Arduino pro mini. The Decawave sensor and other components (resistors, capacitors, led, etc) are then placed on a PCB. After soldering surface mount device (SMD) components with the Decawave sensor on it, an Arduino Pro mini is connected for controlling and data logging. The total cost is less than USD $40. The UWB device can be configured at different configurations, defining its channel frequency, bitrate, and preamble length. UWB has six frequency bands with centre frequencies from 3.5 GHz to 6.5 GHz. Similarly, the possible settings for data bitrate are 110 Kbps, 850 Kbps, and 6.81 Mbps. Both GPS and UWB-based positioning systems require very high sampling frequency and complex hardware to enable highly accurate timing estimation. As we have used the UWB sensor for positioning, we configured it to its maximum operating range. We configured UWB at channel 2 (3774-4243.2 MHz) with a centre frequency of   For implementing the proposed selective multilateration algorithm, we only require the UWB transceiver for communications and a microcontroller for implementation. It should be noted that Pozyx's system also uses a Decawave sensor for positioning but, the system costs significantly more.

Analysis of UWB and GPS
In this section, the accuracy of both GPS and UWB positioning systems are analysed under the same conditions to ensure no bias. The initial experiments required a field where both positioning systems could be evaluated under the same conditions. For evaluation in an outdoor environment, we conducted the experiments in clear sky conditions with good GPS reception (e.g., 8 to 10 satellites).
For localisation in 3D, the anchors were placed at varying heights. The height of the anchors varied between 0.5 m and 2.5 m. Each anchor was placed at least 10 m apart. Fig. 4 compares the positioning accuracy of GPS and UWB in indoor and outdoor environments. The positioning accuracy of the GPS decreases in the indoor environment. In both environments, the UWB system provides significantly less localisation error compared to the GPS.
For the experiment, an area of 200 m 2 (size of a tennis field) was selected as shown in Fig. 5. In Fig. 5 at the bottom left corner is the coordinate ð0; 0Þ, while ð10; 20Þ is at the top right corner. Along X-axis, it is 10 m wide while along Y-axis it is 20 m long. As the comparison would be in 2D as well as 3D, the height of anchors and tag was also considered. UWB and GPS coordinates and the height were recorded at various positions. The exact distance and height were measured using Laser range finder (Bosch GLM80) and coordinates were marked. The laser range finder has a range of 80 m and a precision of 0.15 mm. Later, these known coordinates were used as a reference to measure error.
For evaluating the performance of the UWB-based system, more than 20,000 readings were acquired at 80 different position coordinates. More than 4000 and 29,000 instances of position were recorded for GPS 1 Hz and 10 Hz, respectively. For logging GPS data, the Adafruit ultimate GPS logger shield was used. The shield has a sensitivity of -165 dBm and can provide an update rate of 10 Hz. During the experiment, it was ensured that the device was placed upright and no hindrance occurred in signal reception. For acquiring UWB data, a UWB-based Decawave positioning chip was used.
This section compares and quantifies the accuracy of both systems in 2D and 3D. For performance analysis/comparison, statistical parameters such as standard deviation (SD), median, root mean square error (RMSE), and confidence interval (CI) were used. Researchers in relevant studies [69][70][71] also used similar sets of parameters.

Two dimensional comparison
In Fig. 6a the mean error in 2D localisation is graphically represented. The mean error is acquired at certain points for both GPS and UWB systems. As the distance can not be negative, the mean absolute error is used for analysis. Fig. 6b shows the cumulative distribution function (CDF) for all three systems. For UWB, the highest error was 0.325 m with 70% instances having an error of less than 0.2 m.
UWB operates on short pulses spread over a wide range. Narrowband signals are more attenuated due to multipath than UWB. GPS accuracy is also affected by the availability of satellites and the time delay between satellites and receivers. From Fig. 6b, it is certain that GPS is far less accurate than the UWB-based positioning system. Table 1 summarises the overall results of 2D positioning. Table 1 shows that the standard deviation of positioning error in GPS is very high. The mean positioning error in GPS is 5.9 m and 6.6 m for 10 Hz and 1 Hz GPS, respectively. Compared to the GPS system, the standard deviation and mean positioning error in UWB is significantly low. Other parameters such as median, RMSE, and CI also confirm the better performance of the UWB system. Based on Table 1, the following conclusions can be made: Based on mean and RMSE, UWB is 40 times more accurate than the 1 Hz GPS. UWB is 36 times more accurate than the 10 Hz GPS. Based on SD and CI, it is also observed that UWB is far more precise than GPS.  Table 2 summarises the overall mean absolute error, standard deviation, median, RMSE, and CI of positioning error of the system. In comparison to 2D, the accuracy of the UWB system against GPS has decreased; instead of 40 times, it is 20 times more accurate for the 1 Hz GPS. Similar results were obtained for 10 Hz GPS where the accuracy decreased from 38 to 19 times in 3D. Unlike the mean, median, and RMSE, the standard deviation does not change much, as we move from 2D to 3D. Using the cumulative distribution function plot, the  overall mean absolute error of the GPS and the UWB system is shown in Fig. 7b. From the above discussion, it can be concluded that UWB offers far more accurate positioning data than GPS. 10 Hz GPS is slightly more accurate than conventional 1 Hz GPS, but it is insignificant in comparison to UWB. UWB is useful for both indoor and outdoor positioning.

Placement and number of anchors
Two way ranging is used to calculate the range of each anchor, and then trilateration is implemented. As the tag moves towards the centre of the field, it is within the range of all anchors and thus produces more accurate position estimations. The accuracy of UWB-based localisation has been investigated for various number of anchors for positioning. As we calculate the distance of each anchor from the tag, based on its TOA, there are some errors in calculating the distance associated with each anchor. In this scenario, the question arises whether adding more anchors would be beneficial in increasing the accuracy or it degrades the accuracy. In Fig. 8 this scenario is analysed.
In Fig. 8a and Table 3, different combinations of 3 anchors were used for trilateration and then a combination of 6 anchors was used. It is evident that a higher number of anchors are beneficial in increasing the accuracy of the system. Similarly in Fig. 8b and Table 4, the same procedure was adopted for 3D localisation. Additionally, it is proven that a combination of 6 anchors is more beneficial than 4 anchors.

Placement of tag
We also conducted experiments to evaluate the accuracy of UWB-     based localisation when the tag was placed at different positions. The results are shown in Fig. 9 and Table 5. It can be observed that the accuracy is highest at the centre of the field and as we move towards the boundary the accuracy gradually decreases. In 2D localisation, the maximum error in positioning of 0.2 m was recorded at the perimeters, while the least error of 0.073 m was recorded at the centre. Similarly for 3D, the least accuracy in positioning was 0.7 m at the perimeters while the maximum accuracy was 0.155 m recorded at the centre.

Analysing the accuracy of the proposed positioning algorithm in static conditions
It can be established from Fig. 10a that the selective multilateration algorithm provides better results where it has the lowest mean absolute error amongst all. Contrastingly, LLSE is not suitable in this case, where its mean absolute error is the highest. Fig. 10b shows the CDF plot of positioning error in 3D. As LLSE did not perform well, it was not considered for 3D. But, in this case, the trilateration algorithm has more errors than the commercially available algorithm and its accuracy drops sharply. From the above discussion on UWB's nature of the error in 2D and 3D, it can be concluded that trilateration is not enough for 3D localisation. The major source of error is in the height or along the Z-axis as shown in Fig. 11. In the presence of this large error, using multiple anchors are not enough to increase accuracy. From data, it is observed that along Z-axis each anchor has a large error, so combining their data is not any beneficial. From Fig. 10, it can be concluded that the above-mentioned trilateration algorithm performed well in 2D only.
The reason for not achieving accurate results in 3D is due to the error along the Z-axis, known as the geometric dilution of precision (GDOP) [72]. Other similar studies that analysed the positioning accuracy of the UWB system [69,71] also used similar heights. This is a limitation in 3D, and the error in Z-axis can be reduced by placing anchors at a greater height, but it has some major drawbacks/challenges, for example.
Placing anchors at a greater height will increase the accuracy along Zaxis often at the expense of decreasing accuracy along the X-axis and Y-axis. Placing anchors at greater heights or hanging them from the ceiling increases the set-up time, which is already more than that of a GPSbased system.

Implementation on a tennis court (dynamic conditions)
The next step was to evaluate the accuracy of the UWB-based localisation system on a tennis court. We chose the sport of tennis due to the popularity of the sport. This deployment scenario is depicted in Fig. 12. As Fig. 12 shows, anchors were placed around the perimeters of the tennis court at varying heights (i.e, 0.5 m-2.5 m). The device was placed onto the back of a player for tracking position movement. The proposed selective multilateration algorithm was used for anchor selection and trilateration.   In this experiment, the number of anchors was four. Only four anchors were placed, one at each corner, 20 m apart. The positioning data was recorded while the tag was in motion. The playing area for a tennis player on a tennis court is 97.8 m 2 (11.89 m long and 8.23 m wide) for singles and 130.4 m 2 (11.89 m long and 10.97 m width) for doubles. Hence, the localisation area was large enough to ensure that the placement of anchors would not interfere with player movement.
A UWB tag was placed on a human body between the shoulder blades.
In professional sports as well, the device is placed at this location since this causes the least interference with the movement of the athlete. Using a laser range finder, the distance was calculated at various points and markings were placed along the path. The instances, where human body passed these markings were recorded with corresponding UWB position coordinates. To analyse the movement Kinovea software was used. For calculating the positioning error, the position coordinates calculated from each algorithm were compared against the physical markings and their respective position coordinates. The selective multilateration algorithm is compared to the trilateration and Pozyx algorithm. The results of these experiments are presented in Table 6 and Fig. 13.
As shown in Fig. 13, the selective multilateration algorithm has the highest accuracy. Its accuracy is 0.222 m (Table 6). Earlier, its accuracy was 0.165 m where experiments were conducted under static conditions. There are four anchors and the area is (400 m 2 ). Standard error and CI were also lowest for the selective multilateration algorithm. Neither smoothing filter (moving average or median filter) was applied to the data to ensure that the accuracy of the UWB-based positioning hardware was analysed and the results could be reproduced in a similar setting. The following are the major reasons for the inaccuracy.
In the UWB-based positioning system one of the main sources of error that results in degrading accuracy is the multipath. Multipath occurs more in indoor environments than in outdoor environments. As for the tennis court, the experiment was performed outdoor hence, it is more accurate than indoor. In the earlier experiment, while comparing UWB against GPS, two anchors were mounted on the wall and another two anchors were placed very close to the wall. In the outdoor conditions, there is no wall or major obstruction near the anchors, reducing the error. This is consistent with the findings in Ref. [70].

Machine learning to improve the positioning accuracy of UWB systems
In the preceding section, a trilateration algorithm was used to    determine the position of the tag. The error introduced by two way ranging is non-linear and the accuracy is further affected by the location of the tag on the field which changes as we move from edges to the centre. Machine learning can be used in this case. Machine learning provides better capability to learn such non-linear functions.
We employed a multi-layer perceptron (MLP) feed-forward artificial neural network (FF-ANN) with backpropagation to train and improve the accuracy of the UWB-based localisation system. The network consists of 3 layers: i) the input layer, ii) the hidden layer, and iii) the output layer. Fig. 14 shows the FF-ANN used for predicting the position of the tag. The distance information from 6 anchors is provided as input to the input layer.
Three types of activation functions can be used with the backpropagation algorithm: log-sigmoid, linear transfer function, and tansigmoid. In this work, we used Logsigmoid function because relevant studies [73] suggest that Log-sigmoid is more accurate than the Tan-Sigmoid activation function for localisation. The hidden layer consists of a Log-sigmoid activation function while the linear transfer function is used for the output layer. For 2D positioning, the hidden layer consisted of 4 neurons. For 3D positioning a hidden layer with 7 neurons was used.
For training the network, 30,000 samples were collected from 120 different positions. Matlab neural network toolbox was used for the analysis. The moving average filter was used for smoothing the raw sensor data. In both the cases (2D and 3D), the number of maximum iterations was set as 1000, but in each case, training stopped after around 700 iterations due to the network approaching maximum validation failures at 6. Weights of the neurons were updated according to Levenberg-Marquardt optimization. With a higher number of neurons in the hidden layer, the network can suffer from "over-fitting". Over-fitting occurs when the model adapts too well to the provided dataset, and rather than generalizing a new data, it converges to data from the earlier dataset. To avoid over-fitting, we gradually decreased the number of neurons. When a machine learning model shows good performance on the training dataset and generalises the new dataset well, it is called "Good Fit". Fig. 15a shows the 2D positioning results in terms of the mean absolute error predicted by the proposed model. The tested accuracy on a new dataset is 0.053 m with 4 neurons in the hidden layer. From Fig. 15b it is clear that higher accuracy can be achieved by using a machine learning technique. Unlike the earlier algorithm that performed well in 2D, but performed relatively poorly in 3D, our proposed machine learning technique performed better in 2D as well as in 3D. In 3D the highest accuracy was achieved with 7 neurons and the accuracy was 0.118 m.

Conclusion
In this paper, we investigated the performance of the GPS and the UWB-based localisation for wearable sports performance monitoring systems. We presented the research methodology, our developed hardware, and the hardware set-up used for measuring the performance of the GPS and the UWB-based systems. Our findings include quantitative analysis of localisation accuracy achieved from the GPS and UWB-based systems for a representative sport (i.e. tennis). Our quantitative analysis shows that while the UWB-based system outperforms the GPS-based positioning (1 Hz and 10 Hz) system, the accuracy of the UWB-based system starts to decrease in areas close to boundaries/edges, raising concerns about its suitability for applications in sports performance monitoring. In a sport like tennis, players spend most of their time in areas close to the boundaries, so the decrease in accuracy of the UWBsystem is a major concern. In our future work, we will investigate how the accuracy of the UWB-based indoor localisation system can be further improved by fusing data provided by MEMS based inertial sensors with the UWB system.