Location-Aware Wireless Resource Allocation in Industrial-Like Environment

The advent of the fourth Industrial Revolution (Industry 4.0) requires wireless networked solutions to connect machines. However, the industrial environment is notorious for being averse to wireless communication, with traditional wireless resource mechanisms prone to errors because of metallic objects. In this work, we propose to exploit the knowledge of location to derive context information and dynamically allocate wireless resources in time and space to target devices. We exploit the spatial geometry of the Access Points (APs) and we introduce a statistical model that maps the user position’s spatial distribution to an angle error distribution and derive a hypothesis test to declare if the link is under metallic blockage or not. In order to avoid changes to the client side and operate with a single interface radio, we use the same wireless network both for positioning and scheduling. We experimentally show that our system can localize four mobile robots deployed in a very harsh environment with metal obstacles and reflections. Context information applied to wireless resources protocol help increasing up to 40 percent of the network throughput in the above industrial-like scenario.


INTRODUCTION
T HE advent of Industry 4.0 solutions to automate manu-facturing technologies [1] is challenging the way machines execute complex tasks. Machines are becoming more autonomous, flexible and cooperative, and wireless networked solutions could ideally greatly help increase the productivity in these environments. However, environments strongly affected by the presence of metallic objects, such as Industry 4.0 deployments, challenge the reliability of wireless communication. In turn, the mere usage of wireless protocols that have been designed for more traditional environments (home, office, shops, etc.) results in networked solutions that are prone to error in harsh environments. As of today, there is a limited investigation of tailored wireless networked solution for challenging and harsh environments.
Pervasive positioning is a cornerstone to enable several data analytics and applications, and in this work we investigate its potential for networked solutions in harsh environments. While Location-Based Service (LBS) providers are ready to exploit new and better position information for data analytics and personalized services, the potential for network applications of positioning data remains largely unleashed. Positioning data may be exploited not only as a service offered to customers, but also in the network core to better allocate network resources based on the expected link performance.
The idea is to take advantage of positioning data as a type of context information to enable reliable mobile communications, where context refers to the information considered to forecast the system evolution. Past work has mainly focused on the problem of deriving Radio Environmental Map (REM) from geo-localized measurement and applied that to theoretical understanding of how to perform rate prediction along the users' trajectories in order to optimize the scheduler allocation [2]. On the other hand, there is lack of experimental work in this area. The challenge is that it requires the integration of several network and positioning software and hardware components involving a large scientific and engineering effort. As a result, there is limited experimental understanding of what is possible to do using location for context-aware communication.
The experimental investigation of networking solutions is of particular importance for the optimization of the medium access control (MAC) protocol. The MAC has a key role in the resource allocation in the network. It is directly responsible for controlling access to the shared communication resources. In most cases, the network designer does not know about the network conditions and has to assume that they may change during operation. The traditional approach in MAC protocols to handle unknown or changing conditions is to provide an adaptation mechanism in order to adjust the operation to the actual network load and signal-to-noise ratio (for instance, using a different modulation scheme), and recover from failures in data transmission (for instance, re-transmitting after a longer back-off period). We also observe that there is some similarity between metallic blockages for wireless signals at sub 6 GHz and a larger variety of blockages for wireless signals at mmWave frequencies. However, MAC designers for communication at sub 6 GHz typically ignore the possibility that the wireless channel could undergo total blockage that can completely reflect the signal transmitted. Recovery from such cases happens only at higher level through an inefficient Maurizio  handover procedure that attempts to connect the client to another AP in the network.
We investigate how to dynamically allocate MAC resources to target devices, based on location data extracted from a positioning and communication system. In order to avoid changes to the client side and operate with a single interface radio, we consider essential to use the same wireless network both for positioning and communication. Our positioning solution uses two-way Time-of-Flight (ToF) measurements to compute the ranges from APs to targets [3]. The environment under study (w.iLab.2 testbed 1 [4]) is full of metal objects which block Radio Frequency (RF) signals and cause strong reflections, impacting on the quality of wireless communication. In [5], experiments with channel sounder in the same Testbed confirmed that the presence of metal obstacles causes much stronger multipath effects with respect to office environments.
We target the analysis of MAC scheduling strategies in this environment and aim at studying whether location information can be leverage to optimize MAC scheduling decisions.
For such very harsh environment, our contributions are: We exploit the spatial geometry of the deployed APs of our positioning system and present a statistical model to map the spatial likelihood of target device position to an angle error distribution.
We derive a hypothesis test to declare if the link is under metallic blockage or not, and we propose a location-aware MAC protocol that leverages our hypothesis test to alleviate blockage and severe multipath in industrial-like scenarios; We integrate our location-aware MAC protocol in the WiSHFUL architecture [4], which fully supports hybrid (centralized and distributed) control and network intelligence, and whose environment presences strong metallic objects as in industrial scenarios. Our experimental results show that our statistical angular information can help increase the network throughput in industrial-like scenarios for mobile (robots) devices. The experimental results show a throughput gain of 15 and 40 percent for Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) and Time-Division-Multiple Access (TDMA) protocols, respectively.
The reminder of this paper is organized as follows. Section 2 presents related work in the area, and Section 3 describes the motivation behind our work. We then introduce our angle error model and blockage detection algorithm to detect the link state in Section 4. We then present the whole system architecture in Section 5, and the testbeds in Section 6. We show the experimental evaluations in Section 7, and we draw the conclusion in Section 8.

RELATED WORK
Recently, the 5G Infrastructure Public Private Partnership (5G PPP) has started to show interest in exploiting location information beyond location services for emergency services and lawful intercept, and has defined parameters that can be exploited for coverage and capacity optimization as well as mobility robustness optimization [6]. In this regard, location-aware network management has the potential to deliver a resilient network that could rapidly identifies network issues as well as optimise the service performance. In particular, having accurate mechanisms for mobile localization is the key to guarantee seamless connectivity and introduce new services [7].
In the area of network optimization, past work has mainly focused on building maps of metrics based on geolocated measurements, a concept denoted as REM, from geo-localized measurement [8], and being applied to problems such as frequency reuse planning [9], coverage analysis [10], or forecast scheduling [2], [11]. The latest refers to a scheduling concept that utilizes rate prediction along the users' trajectories in order to optimize the scheduler allocation. This work shares the same objective of optimizing the rate allocation across a trajectory. However, it largely differs from the body of work in the literature for three fundamental reasons: i) we investigate an industrial scenario, which presents unique propagation properties, ii) we rely on location position estimates rather than REM measurements, iii) we show that our solution works with an experimental study rather than relying on simulations as in past work.
Another area that shares some similarity with this work is network allocation for mmWave frequencies, for which an accurate location is needed, given the high directionality of beams at these frequencies and the fragility of the communication links at these frequencies. mmWave suffers from obstacles, and similarly sub-6 GHz frequency do in industrial scenarios. For instance, [12] used Angle of Arrival (AoA) information from a low frequency communication system to drive beam steering decisions for a mmWave phased antenna array. In this area, past work has showed that beam training can be accelerated assuming the availability of context information such as the angle, the orientation of the mobile device and its distance to the AP [13], or the device location through Global Positioning System (GPS) [14]. In particular the latter treats the location accuracy as a given parameter. We instead develop an angle error model based on the desired confidence level of the estimated position. In [3], we introduced our positioning system in the same testbed as in this work and evaluated its performance for static and mobile devices, that we refer in this work as User Equipment (UEs). We experimentally showed that our system can localize four mobile robots tracked together with a median error between 1.8 and 3.8 m. Furthermore, in this industrial environment, we compared our solution with the best known algorithms based on signal strength measurements that showed an average error of 6-7 m but with only one static target device. To the best of our knowledge, there are no other works that have tested WiFi positioning systems in industrial-like environments.

CONTEXT-AWARE RESOURCE ALLOCATION
In this work we transmit communication and location data using the same WiFi infrastructure. For localizing the devices, we deploy our legacy WiFi positioning system [3]. The system uses ToF measurements collected from a set of APs to localize a mobile device. Let us refer to Fig. 1. Each AP performs ToF measurements, which consists of sending 802.11 Probe Response messages which are ACKed by the mobile device after the propagation time t p . Timestamps are measured at the AP side at the end of Probe Response transmission and ACK reception. From these timestamps, the distance is estimated as where c is the speed of signal propagation which is close to the speed of light in air, t MEAS indicates the time between the end of the Probe transmission and the reception of ACK, t ACK the duration of the ACK (known from the standard), and d T is the implementation of the Short Interframe Space (SIFS) of the standard. As studied in [15], this value must be estimated, conducting measurements (only once) at a known distance. Once distance measurements have been collected, the Central Location Unit (CLU) is responsible of positioning the target device. Details on the implementation of our positioning system can be found in [3]. The system may in the future also leverage the more recent Fine Time Measurement (FTM) of the 802.11-2016 standard. However, because our objective in this work is the experimental evaluation of context-aware resource 2 allocation in industrial environment, we exploit the facilities of the w.iLab.2 Wishful testbed, which will be detailed in Section 5.
The environment under study is affected by strong blockage due to metallic reflecting surfaces [5]. In this environment, a high number of reflections is encountered and often there is blockage in the direct link between the AP and the target device. The presence of metallic blockage causes link outages and poor link performance. This condition is stronger than in traditional indoor environments where the wireless signal can still pass through the object with refraction.
In order to characterize the environment under study, we infer the number of dominant paths (clusters) k in our industrial-like scenario. It has been shown that in typical environments the number of dominant paths is up to 5 [16]. However, the industrial environment causes a larger number of reflections due to metallic structure. This is confirmed by our experimental observations, and we illustrate this problem in Fig. 2. The identification of the number of clusters is performed using the lowest Akaike Information Criterion [17]. We find that setting a maximum number of clusters equal to k ¼ 8 helps increase the accuracy of the device location estimation. Furthermore, we analyze for each cluster the mean of the positioning error and the variance over all estimated positions shown in Fig. 2. Table 1 shows the obtained numerical results, highlighting the importance of using a number of clusters equal to 8. For k = 8, we achieve the minimum positioning error and we keep a value of the variance close to the minimum. Once the positioning system is laid out, we use location data to elaborate mechanisms to allocate the network resources more efficiently [18]. An illustration of the concept is presented in Fig. 3, where we consider a system where the network has access to the estimated UE location for allocating the wireless network resources in time and space. Furthermore, we assume that the location of metallic objects in the environment is known, for instance through access to the map of the environment.
The overall objective is that each AP avoids to transmit communication data to a UE if it can anticipate though location data that the UE is behind a metallic blockage. In fact, the link would be totally disrupted in these conditions, or it could reach the receiver only through several bounces through the industrial environment which will inevitably make the signal much weaker. We use the same infrastructure both for communication and localization, and we assume that UEs that do not receive communication data from an AP because of  Clustering measurements assuming that each link may have multiple reflections helps increase the accuracy in the positioning of the mobile device (true position indicated with a cross). Using a maximum value of cluster equals to 8 per link allows us to achieve the best performance in terms of positioning accuracy. 2. Note that the term resource indicates a transmitted packet.
blockage is still reachable from some other AP in the network. In order to make decisions for allocating the network resources, in the ideal case of perfect knowledge of location position, each AP should "draw a line" between itself and the UE, and verify if there exists metallic blockage inbetween. Since noise and obstacles affect the positioning system itself, the only line between the AP and the estimated UE location does not ensure that the UE is affected by blockage. For this reason, it is convenient to map position information, including the error, into angular information, as presented in the next Section.

ANGLE ERROR MODEL AND BLOCKAGE DETECTION
Let us refer to Fig. 4, where the angle error u is the angle observed by the AP between the real position P of the UE and its estimated positionP . The presence and absence of obstacles from the AP to the UE can be inferred from two parameters: angle u and ranging from the AP to the estimated positionP . As the position estimateP has an uncertainty that depends on the precision of the measurement, we derive a statistical model of the angle error from the estimated locationP , the spatial geometric information, and the desired confidence level p that the true position P is inside a given spatial area. In our scenario, the positionP is estimated with WiFi ToF from a set of APs deployed in the area. While each AP could also deploy multiple antennas for Angle of Arrival (AoA) measurements, the latter approach is less effective in a harsh environment as the industrial scenario where the AP performing the measurements may have a metallic blockage to the UE. In addition, we will see that our method uses distance measurements to infer if the UE is behind a blockage or not. This capability is inherent to systems performing distance measurements. Therefore, we rely of multiple APs deployed in the area, and estimate the UE location exploiting the APs with better connectivity to the target device. Once the position is derived, the angle can be derived as performed by our model introduced in the next Section. The model that we present will be used in Section 4.4 to detect if the link between the selected AP and the UE is affected by blockage.

From User Position Error to Angle Error
Let us refer to Fig. 4 where we consider a scenario with a fixed AP and a mobile UE. We assume a 2D Cartesian coordinate system. Extension to the 3D case is straightforward. The AP position is known and equal to p AP 2 R 2Â1 . Given x ¼ x þ e x andŷ ¼y þ e y , the UE's real and estimated positions are p UE ¼ P ðx; yÞ 2 R 2Â1 andp UE ¼P ðx;ŷÞ 2 R 2Â1 , respectively. The terms e x and e y represent the location errors on the x-and y-axis, respectively.
Let us also defined ¼ kp AP Àp UE k as the estimated distance from the AP to the UE, and e ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi e x 2 þ e y 2 p as the UE position error. We draw the circle of radius e and centered inp UE , and we then consider the triangle of vertices p AP ,p UE and the intersection between the line that is tangent to the circle and crosses p AP . We then introduce the angular region of width 2u, given by u ¼ sin À1 ðe=dÞ : Let us now define p 2 ½0; 1Þ as the level of confidence of the position error. A location error e p can be defined, which maps, in turn, to an angle error which holds for e p d , i.e., u p p 2 . For a given confidence level p, the UE is located anywhere in the circle (inside or in the border). Furthermore, from Eq. (3), a low p reduces the width of the angular region, but it increases the probability that the link detection fails.

Closed-Form Expression of CDF of Location Angle Error
We derive a closed-form expression of the Cumulative Distribion Function (CDF) of the location angle error. We aim to derive a function of parameters that can be estimated by the positioning infrastructure and of the desired confidence level. Let us consider ranges with normal distribution. We can then assume that the position error is a bi-variate normal distribution, where the statistical processes e x over the x-axis and e y over the y-axis have no correlation, and that e x and e y have zero mean. We also define dRMS ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi s x 2 þ s y 2 p as the distance root-mean-square error, where s 2 x and s 2 y , are the variance of e x and e y , respectively. Assuming that the sources of error in the x-and y-axes have the same statistical distribution, the statistical processes e x and e y have  identical normal distributions with s ¼ s x ¼ s y . It follows that dRMS ¼ ffiffiffiffiffiffiffi ffi 2s 2 p . We can then resort to the error modulus e ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi e 2 x þ e 2 y q to describe the position error, modeled as a Rayleigh CDF The dRMS is often referred to as "63 percent error distance", meaning that 63 percent of errors fall within a circle of radius dRMS, i.e., PrðE dRMSÞ % 0:63 [19]. The CDF of the distance error in Eq. (4) can be mapped to the location angle error CDF as follows: which based on Eq. (4) can be expressed as We remark that the angular error in Eq. (6) is not a Rayleigh function because of the trigonometric function sin . Furthermore, the function is non-continuous in u ¼ p 2 . Computing F À1 Q ðuÞ, we can derive a closed-form expression of the location angle error u p as a function of geometric parameters and the desired confidence level p 2 ½0; 1Þ We can remove the dependence on dRMS by resorting to the Horizontal Dilution of Precision (HDOP), used in geomatics engineering to measure the multiplicative effect of the geometry of the APs on the positioning accuracy based on the (known) AP coordinates [20], [21].
For the formal definition of HDOP, we denote the matrix containing the AP coordinates. We can then define the matrix A containing the unit vectors of the direction between each AP and the UE For instance, when the visible APs are in the same line as the UE or close (as it would occur measuring the distance from multiple antennas in the same AP), the geometry is unfavorable for positioning and the HDOP value is high. In contrast, in the ideal case of perfect spatial geometry (for instance APs distributed in the corners of a square), the HDOP is close to one for most of UE locations. Using the HDOP, the dRMS can be expressed as follows [19]: where sd is the standard deviation of the estimated distances for a specific location. Substituting Eqs. (10) into (3) and computing F À1 Q ðuÞ, we can derive the following closed-form expression of the angle error u p : The model in Eq. (11) also shows that a low HDOP allows us to reduce the error in the estimation of the angle u p . In other terms, a correct deployment of the APs is important to achieve good performance in the angle estimation.

Estimation Process of the Angle Error
From the above analysis, the estimation process of the angle error u p for a given confidence value p with respect to an AP, AP n , operates as follows: The test is as follows. Accept H 2 (H 2 ¼ 1) if both conditions below are fulfilled: The position of a metallic obstacle falls within the angular portion 2u p ; The estimated distanced ¼ kp AP Àp UE k is higher than the radius from the AP to the metallic object. Stay with H 1 (H 1 ¼ 1) otherwise. Given the strong link quality degradation in presence of metallic blockage, we allocate the wireless network resources for those links that satisfies the hypothesis H 1 only.
Two examples of the impact of the choice of the desired confidence level p are shown in Fig. 5. In fact, as shown in the first example of Fig. 5a, choosing a low p ¼ 0:1 reduces the width of the angular region, but it may not be sufficient to detect the blockage (false negative detection of blockage). In contrast, a larger confidence level, as p ¼ 0:6, results in a larger angular region, which includes the real UE position and hence the metallic obstacle. In the other case shown in Fig. 5b the opposite holds, and a large confidence level results in false positive detection of blockage.

SYSTEM ARCHITECTURE
We integrate our location-aware network resource allocation (cf. Section 3) in the WISHFUL architecture [4] in order to investigate how location information can help MAC protocols. WiSHFUL integrates multiple experimentation platforms for which a software architecture devised to simplify MAC or PHY protocol prototyping was already available. In this work we leverage the Wireless MAC Processor (WMP) platform [22]. The WMP platform was developed exposing an Application Programming Interface (API) for controlling the driver, by enabling the possibility to specify the configuration parameters of the WiFi chipset in a declarative language.  traditional Distributed coordination function (DCF) scheme of 802.11. We enhance the TDMA mechanism to allow for finer scheduling decisions, as explained next. We divide the channel access in periodic frames, and each frame in time slots. To avoid transmission collisions, all nodes are tightly synchronized to the same reference time provided from the AP by the Time Synchronization Function (TSF). We activate each radio program after an explicit signaling from the control program used to transmit parameters to configure channel access scheme. The TDMA radio program has three main parameters: TDMA_SUPER_FRAME_SIZE -Duration of periodic frames used for slot allocations in ms; TDMA_NUMBER_OF_SLOT -Number of slots included in a super frame; TDMA_ALLOCATED_MASK_SLOT -Pattern of used slots in frame; Fig. 6 shows an example of 3 TDMA frames where two stations are active and each frame has 5 slots. For instance, in the first frame, the TDMA_ALLOCATED_MASK_SLOT parameter of the UE 1 is configured to use the slots 1, 2 and 3 (pattern:"11100"), while the UE 2 is configured to use the slots 4 and 5 (pattern:"00011"). The logic for activating the TDMA protocol and setting the relative mask pattern is embedded into the experiment control program.

Algorithm 2. Location-Aware Resource Allocation
CSMA/CA. In the CSMA/CA radio program, the channel access is not divided by periodic frames and each resource is allocated singularly, without waiting for periodic frames. In fact, in CSMA/CA, as soon as the node receives a packet to be sent, it checks if the channel is clear. If this is the case, the packet is sent, otherwise the node waits for a random period of time until the channel is clear and it can then transmit the packet. At the AP side, all the packets are pushed in a buffer, ready to be sent to some specific UE. In CSMA/CA Allocation of Fig. 6, we can see three different moments where the buffer is accumulating packets just for reachable UEs.

TESTBEDS
We perform experiments in the Testbed I that can be considered representative of an industrial indoor environment. A picture of the testbed is shown in Fig. 7a. Testbed I presents open spaces surrounded by metal obstacles where radio communication has notorious difficulties. One of the key aspects is the fact that metallic objects create a strong blockage component. In Fig. 7b we show a scenario of the industrial testbed, where yellow squares indicate metallic objects.  Additional metallic objects are tubes presented in the area (c.f. Fig. 7a). All APs use Alixes boards and UEs are all robots based on the Turtlebot II Robotic platforms. For further performance assessments, we also deploy and test our positioning system in another testbed (Testbed II). The latter is an office environment covering a total area of 300 m 2 , where concrete walls separate the office from the open area, and significant multipath is present. The map of the proposed scenario is shown in Fig. 8.

EVALUATION
In this section, we experimentally evaluate the angular error model and the criterion for blockage detection introduced in Section 4.4. We then evaluate the exploitation of context awareness with CSMA/CA and TDMA MAC resource allocation in Section 7.2.

Angular Error Model and Blockage Detection
After introducing the location angle error model in Section 4 and the criterion for blockage detection in Section 4.4, we use our data sets collected from WiFi localization measurements to analyze the performance and the validity of our proposed solutions.

Angle Error Model
We use the data set of Testbed II in order to analyze and validate the location angle error model introduced in Section 4. More specifically, for the study we use the following inputs: i) the estimated AP-UE distanced from real experiments ii) the standard deviation sd over the observation period iii) HDOP computed based on the known position of the five APs. Fig. 9 shows the CDFs of the angle error at UE 1 and UE 9 locations using the model in Eq. (11). The CDFs shown in Fig. 9 confirm their dependence ond (c.f. Eq. (6)): the larger d, the smaller the angle u required to achieve a desired level of confidence. The results in Fig. 9 can be used to obtain u p . In fact, by selecting on the y-axis a desired level of confidence p for the position estimate, we can obtain the corresponding u p on the x-axis.
In order to assess the validity of this approach, we then compare the theoretical values computed using Eq. (11) (as in Fig. 9) with the experimental distribution of u p . Using this data set, we then compute the normalized median of the angle error between the experimental and the theoretical outputs across all UE positions with respect to the experimental results, and we show the results in Fig. 10. For a p level higher than 0.1, we observe that our location angle error model matches very well the experimental findings. In absolute terms, our statistical model provides a median location angle error of 1:44 with p ¼ 0:1 and 2:21 with p ¼ 0:4 with respect to the measured one. This shows that multipath is efficiently handled by our positioning system, and it does not affect significantly the validity of the model.

Blockage Detection
We use the data set of Testbed I to analyze the proposed criterion for blockage detection, formerly introduced in Section 4.4. For this study, we use the closed-form expression of the angle error presented in Eq. (11), and experimentally evaluate the impact of the choice of the confidence level p. The objective of the study is to understand the relation  between the confidence level p and the percentage of false negative detection of blockage. The latter is shown in Fig. 11 for all confidence levels p. We can observe that reducing the level p, and so the width of the angular region, we increase the probability to have false positive detection of blockage. In contrast, increasing the level p, we include the metallic obstacle within a larger angular region, decreasing the probability to have false blockage detection. More specifically, a confidence level p = 0.7 is the best choice for blockage detection in Testbed I. For this reason, we use this value for the dynamic allocation of MAC resources in the next section.

Resource Allocation
In this section we evaluate the exploitation of context awareness for CSMA/CA and TDMA resource allocation for mobile nodes deployed in Testbed I.

CSMA/CA
As first scenario for the evaluation of the exploitation of context awareness, we consider a MAC based on CSMA/ CA, where two robots are moving with respect to the AP. This scenario is shown in Fig. 12a, where the red circle indicates the position of the AP, the green crosses the initial positions of the mobile robots (UEs in the figure) and the blue lines their trajectories. For these mobility tests, the robots are moving along the trajectories on a straight line path at a speed of approximately 0.5 m/s. The latter is kept constant except for the turning points of 90 in the pathway. We have considered this simple mobility model to avoid physical collisions of the mobile robots with blocking metals. Starting from the initial positions, each UE requests access to the 802.11 network and then a reliable link is established. Once they move along their trajectories, the link quality decreases due to the presence of huge metallic obstacles (yellow boxes on the map), drastically reducing the network throughput. We avoid this degradation applying the method presented in Section 4.4, in order to allocate the wireless network resources for those links that accept the hypothesis H 1 .
In order to measure the network throughput we use the well known tool Iperf and we show the results in Fig. 12b. More specifically, we normalize the throughput with the respect to the maximum achieved throughput along the 40seconds trajectories of UE 1 and UE 2 , and we compare it allocating the resources with three different strategies, simple CSMA/CA and CSMA/CA with ideal and real context awareness. Following the blue line in Fig. 12b, we can clearly see that the performance of the simple CSMA/CA presents a degradation in accordance with the blockage. In order to verify the performance of the algorithm in the ideal condition where the direct link for UE 2 and the AP is subject to blockage and with a marginal error in the position estimation, we use the known real position of the user along its trajectory, provided by the Localization and Positioning Engine of WiSHFUL. Doing so, we can maintain the network throughput constant (red line, CSMA with ideal context awareness), stopping the traffic on the links under metallic blockage. Supposing now the case where the real position is not known, we use the positioning system as source of context awareness, in order to compare this scenario against the previous ideal scenario. In this real-world scenario, we select a confidence level p = 0.7 (choice motivated by the results in Section 7.1.2) and we use the corresponding angular region as input to decide whether the user is in a zone of low network coverage. The dotted black line in Fig. 12b represents the overall performance in our experiment of the CSMA/CA with real context awareness and it shows no difference between real and ideal results, suggesting that the positioning error is low enough for the link decision. In fact, pointing at the estimated position of the user and taking its angular error, we have that the real position is inside the angular error (UE 2 in Fig. 12a), and so we declare the links as under blockage as the real case.

TDMA Allocation
We study a MAC-based on TDMA allocation in two different scenarios of Testbed I. Implementation-wise, in the latter cases we use the implementation presented in Section 5.1, allocating different time slots at each user. In particular, the control program configures the TDMA assigned slot based on context awareness extracted from the positioning system itself.
The scenario is illustrated in Fig. 13a and it considers a MAC-based on TDMA allocation with one static and one mobile node. Specifically, UE 1 (robot 15) is fixed, while UE 2 (robot 13) is in movement with respect to the AP. We analyze the normalized network throughput along a 30-second trajectory. From Fig. 13b, we observe that using simple TDMA with a fair (equality-wise) allocation of the resources (50-50 percent with 2 nodes, blue dashed line), the performance presents a degradation in accordance with the radio link blockage. As previously mentioned, being aware of the provided context information, we are able to avoid the overall throughput degradation and maintain an optimal network throughput. The overall performance (dotted black line, TDMA with real context awareness) shows the throughput improvement compared to the simple-TDMA setting. However, we observe that this time we have some performance loss compared to the ideal case due to estimation error in the positioning. Yet, the gain with respect to a simple TDMA allocation of 50-50 percent is evident from the figure.
The last scenario is illustrated in Fig. 14a and it considers a MAC-based on TDMA allocation with four mobile nodes. We analyze the normalized network throughput along 130-second trajectories. We plot the ECDF of the normalized network throughput in Fig. 14b. We observe that using simple TDMA with a fair (equality-wise) allocation of the resources (25 percent for each node, blue line), the ECDF presents a maximum normalized throughput close to 0.7, which corresponds to the median value of TDMA with ideal context awareness. Also this time the dotted black line (TDMA with real context awareness) shows the throughput improvement compared to the simple-TDMA setting, and at the same time it shows some performance loss compared to the ideal case due to estimation error in the positioning.

CONCLUSION
We have performed an experimental study to evaluate the capability on integrating context information for the allocation of network resources in industrial-like scenarios. Our approach is based on a hypothesis test to detect blockage conditions from metallic objects for wireless communication at sub-6GHz frequencies. It uses solely positioning information collected from the same wireless network. Through experiments, we have shown the benefit of integrating context data in network protocol stack to optimize the overall network performance in harsh environments. With the advent of new ranging methods such as FTM, we expect that the concepts derived in this work can be further enhanced for Industry 4.0 scenarios. They can also be extended to 5G networks and beyond, where positioning is achieving high attention in the recent Release 16 and 17 of the 3rd Generation Partnership Project, and the application  of positioning to improve network resource allocation is still in its infancy.