Prediction of nodes mobility in 3-D space

Received Jul 12, 2020 Revised Dec 14, 2020 Accepted Dec 29, 2020 Recently, mobility prediction researches attracted increasing interests, especially for mobile networks where nodes are free to move in the threedimensional space. Accurate mobility prediction leads to an efficient data delivery for real time applications and enables the network to plan for future tasks such as route planning and data transmission in an adequate time and a suitable space. In this paper, we proposed, tested and validated an algorithm that predicts the future mobility of mobile networks in three-dimensional space. The prediction technique uses polynomial regression to model the spatial relation of a set of points along the mobile node’s path and then provides a time-space mapping for each of the three components of the node’s location coordinates along the trajectory of the node. The proposed algorithm was tested and validated in MATLAB simulation platform using real and computer generated location data. The algorithm achieved an accurate mobility prediction with minimal error and provides promising results for many applications.


INTRODUCTION
Various applications in vehicular networks and mobile networks require a prior knowledge of the exact node's route (trajectory) to accomplish specified goals. The knowledge of the future connectivity of such networks can be employed to ensure higher performance in terms of data delivery [1], resource management and trip planning [2]. The lake of this knowledge can lead to delays in delivering real time data and cause frequent connectivity issues.
The predicted topology can be used by wide variety of applications including but not limited to planning of efficient data exchange between mobile nodes, detection of any potential danger while monitoring oil and gas pipelines, accidents and traffic management, road safety and traffic analysis, intelligent transport system, early warning systems and many other applications [3].
Mobility prediction provides many benefits to various types of networks. In cellular networks, an accurate prediction of the user mobility ensures efficient resource management, location-based management and smooth and fast handover decision [4]. It also calculates the period of time for the mobile device to remain under the coverage of the cell, in addition to the prediction of the next cell where the mobile node is moving toward [5][6][7][8]. In vehicular networks, historical vehicular movements were used to extract mobility patterns to develop trajectory prediction to achieve an improved data delivery [9][10][11]. In unmanned aerial vehicle (UAVs) numerous civilian, commercial, military, and aerospace applications such as border security, firefighting and emergency rescue operations, monitoring of agriculture crops, oil and gas pipeline surveillance, public places surveillance and many other applications [12], the prior knowledge of the UAVs flying paths can lead to an efficient exchange of the gathered information between the UAVs in the proper time and in the suitable space.
In the literature, many mobility prediction techniques with different capability and various complexity were used. These techniques vary depending on the nature of the node mobility, the size of the networks, the type of the networks and the applications of these networks . In dead-reckoning techniques the mobility prediction schemes predict the future location of the mobile node based on the speed and the direction of the mobile previous movement [13,14]. Pattern matching prediction schemes in [15,16] search past mobility traces of the node for a matched mobility pattern to predict the future network mobility. The authors in [17] use the cell sequence history to predict the next cell and the trajectory of the mobile node. Machine learning techniques are also used in predicting node's future location in cellular networks [18][19][20]. Classification of the spatial trajectory techniques were used to achieve an accurate location prediction [21]. It is possible to combine more than one prediction scheme to produce consistent, accurate, and useful predictions.
Mobility prediction measurements are essential to determine the performance of the prediction method. Many metrics are used to evaluate the prediction accuracy and to decide whether the prediction method is valid or not [22]. In some cases, determining whether a prediction is accurate or not is not easy. Subsequently, error measurements are used to evaluate the closeness of the expected prediction and the user's mobility [23].
Entropy is used to capture the degree of prediction characterizing a time series. It was shown that strong regularity exists in daily vehicular mobility and the mobility of humans in both temporal and spatial dimensions [24]. This implies that prediction can proceed at a high degree of accuracy. Most of the prediction techniques require complex analysis, intensive computation and the involvement of hidden free parameters such as machine learning methods, neural networks and support vector regression methods, while others can accumulate error during the prediction cycle despite their simplicity such as dead-reckoning techniques [25].
In this paper, we provide a novel method of prediction which is simple, efficient and provides accurate results. The algorithm predicts the future mobility of mobile networks in three-dimensional space using polynomial regression then produces a function that relates the location and the time for each component of the location. The rest of the paper is organized as follows. Section 2 presents the prediction algorithm and the methodology of mapping the location and time. Section 3 discusses evaluation of the algorithm and the simulation results. The conclusion of the paper is presented in Section 4.

RESEARCH METHOD 2.1. Proposed prediction architecture
This paper is an extension of our previous work [26], where we proposed a framework to predict the mobile nodes location in three-dimensional space. The x, y, and z coordinates of each predicted location are then mapped into a time function. Parametric equations are used to describe each node in the network along its trajectory. Multivariate polynomial regression is constructed to fit these points as shown in Figure 1. This paper validates the proposed framework through simulation and shows how the prediction scheme is used to predict the future topology of the mobile network. The predicted mobility model is built for the whole network by continuous modification of the predicted location matrix of each node. This will be explained in detail throughout the paper.
In Figure 2, consider a mobile node at point A with ( 1 , 1 , 1 ) coordinates at time 1 . After a brief interval of time , the mobile node will reach point B with coordinates ( , , ). Let T be the difference in time between 1 . T will represent the prediction period. Assume that the speed of the node is constant during the prediction period between point A to point B. Knowing the coordinates and time difference between two previous consecutive points leads to the calculation of the speed and the initial direction of the movement. The velocity of the node which describes the change in the speed, the direction or both is a vector with three components as expressed in (1). The magnitude of the speed | 0 ⃗⃗⃗ | [27]. Is assumed constant on [ 1 , 1 + ] while the x, y and z components of the velocity V0 are variable. Hence, the direction of the node's movement is variable too. The trajectory (path) from A to B is represented by a set of points ( 1 , 1 , 1 ), ( 2 , 2 , 2 ), … , ( , , ). The polynomial = ( , ) that fits all points ( 1 , 1 , 1 ), ( 2 , 2 , 2 ), … , ( , , ) must be constructed using second order multiple polynomial regression [28,29] as in (3): where, i= 1,2,…,n a 1 , a 2 are called linear effect parameters. a 3 , a 4 are called quadratic effect parameters. a 5 is called an interaction effect parameter. The regression function is: ( ) = a 0 + a 1 x i + a 2 y i + a 3 x i 2 + a 4 y i 2 + a 5 x i y i The matrix form is represented as: where is a zero mean random error.
The model that describes the multivariate polynomial regression that connects all points is given by: By setting the random error value to zero and substituting the points ( 1 , 1 , 1 ), ( 2 , 2 , 2 ), … , ( , , ) into (8), we can find the values of the constants , . To find out how the location of the points mapped to the time, the speed | 0 ⃗⃗⃗ | is assumed constant throughout the period of prediction T. However, the direction of movement is not. Let ∅ be the angle of the node's trajectory with xy-plane and be the angle of projection of instant speed vector with x axis. Consequently, the node's movement has a direction in terms of the tangent of the curve appears in (9), (10): = tan −1 The velocity of any moving object is the change in its speed and direction of movement which is described by the rate of change of its location with time. In (8), the coordinates are clearly formed. Consequently, the partial derivative of this equation indicates how one variable changes with respect to the other. The slope of the tangent plane along the curve describes the direction of movement of the node and can be mapped as a function of time. As shown in 1 and 2 above relate the components and the magnitude of the speed of the node, Since | 0 ⃗⃗⃗ | is constant on [ 1 , 1 + ], therefore, the change will be in one or more of the components. Since the speed at a certain direction is the change of position in that direction with respect to time; we can express the x, y and z components of the velocity respectively by: The x-coordinate of the location can be expressed by: The speed in the x-direction is also expressed by (12): Consequently, by substituting (11) into (12) we get the following formula, The corresponding time for each point along the set ( 1 , 1 , 1 ) through to ( , , ) that were used to find the polynomial = ( , ) can be determined by a recursive substitution of the x coordinates into (13). The accuracy of the prediction is affected by the value of the prediction period T and the time step = ( − − 1). For a small value of T, the number of points between A and B on Figure 2 could be as few as two points only, which will produce a first order polynomial (straight line) and therefore, no future predicted points are expected. While, for a large value of T, a large number of points is used in constructing the polynomial. Finding a polynomial that fits all these points accurately is too hard. So the constructed polynomial will be an approximation which will produce an inaccurate prediction.
To further explain the effect of T, consider the diagram in Figure 3. Choosing a large value of T is equivalent to finding a polynomial that approximately fits all points between A and C, which is the polynomial in red graph (poly1). On the other hand, choosing a smaller value of T is equivalent to divide the polynomial fitting process into two stages, one from point A to point B, the polynomial in the blue graph (poly2), and the other one is from point B to point C which is the polynomial in back graph (poly3). The figure clearly shows that the accuracy of choosing one polynomial from A to C is less than choosing two polynomials to fits the points from A to B then from B to C respectively.

Network topology prediction (application of the prediction)
The algorithm explained in the previous section enables the predictions of a set of future locations for the mobile node. It also provides a time index for each predicted location for a period of T seconds ahead. Every T seconds, each node in the network predicts a set of future locations that it will be traversed along its own future trajectory and then disseminates them into the network through an update packet. Table 1 shows the information and the format of the update packet. To ensure the maximum benefit of the prediction algorithm each node executes the prediction every T seconds and produces a set pf predicted locations for a period of 2T seconds ahead, this will ensure the availability of enough predicted locations to produce the future topology matrices for T seconds ahead. All nodes receive the update packets at random order and at random time because the beginning of the prediction period for the nodes are not synchronized, therefore it is possible that the predicted future locations for some nodes are not long enough to construct the complete network mobility for a period of T seconds ahead.
To overcome this issue and to ensure the availability of the future topologies for T seconds ahead, each node-at each period T-disseminates the predictions of its future locations for a length of 2T seconds ahead instead of T seconds. To explain this, consider node A in Figure 4 which had just produced a set of future locations of its own and is about to build the future topology matrix. Let the size of the update packet be six locations, which is corresponding to predictions for T seconds ahead, given that node A had received these updates at different timing. At the current time, it is not possible for node A to predict a complete set of future topology matrices of the network because the future locations for node F are not available, moreover the future locations for other nodes such as node B and node D are insufficient.
On the other hand, consider the case in Figure 5 with the number of the predicted locations is twelve, this is corresponding to predictions for a period of 2T ahead. In this case the current information is sufficient enough to predict the complete network topologies for the period T and therefore for at least a set of six future topologies.

EVALUATION OF THE PREDICTION RESULTS
A MATLAB simulation was carried out to evaluate the prediction algorithm presented in this paper, it also tested its accuracy and its prediction ability. The simulation was implemented on a network area of 2000 m by 2000 m. The simulation deployed a set of mobile nodes in the area of interest then generated a route from a randomly chosen source to a random destination. The coordinates, the speed and the time for the node trajectory along the selected path between the source and the destination are used to simulate the actual trajectory of the selected node. Then, the algorithm was applied to predict the trajectory of the same node using the prediction model and then compares the actual and predicted trajectories for the same node. The simulation compared between the X-Y coordinates of the actual and the predicted trajectories. Similar results were obtained for the prediction of Y-Z coordinates and X-Z coordinates. The simulation also studied the effect of the prediction period (T) by applying different values of T. A comparison between the predicted and the actual trajectories for the mobile node using two different prediction periods, the length of the prediction period T was thirty-five seconds and five seconds respectively. The accuracy of the algorithm inversely proportional to the prediction period T. the prediction error was obvious when the value of T set to thirty-five seconds as shown in Figure 6 while the actual and the predicted trajectories in Figure 7 with T set to five seconds-are almost identical with negligible prediction error.   The main two sources for the errors are the assumption of constant speed during each prediction period and the formulation of the optimal polynomial. The choice of the points, the number of these points, and the degree of the polynomial affect finding the polynomial that fits all the points along the trajectory. Figures 10 and 11 show the prediction errors for two different values of the prediction period T. When the prediction period set to T=35 seconds as it appears in Figure 10 the mean absolute error measures an average value of 20 m. This value measures less than 1 m when the prediction period is reduced to T=5 seconds in Figure 11. The efficiency of the prediction can be improved by reducing the prediction period but on an expense of more frequent updates. Figure 12 shows how the average absolute error varies with the prediction period (T). The mean absolute error is proportional to the prediction period T in nonlinear second order relation. Figure 12. Average error vs prediction period (T) for X coordinates and Y coordinates

CONCLUSION
In this paper, we proposed, tested and validated a framework for three-dimensional space mobility prediction. The paper presented the mathematical model of the prediction and showed how each component of the trajectory mapped into a function of time. It also shows how the predicted locations can be used to build a set of future topology matrices The evaluation of the prediction algorithm confirmed the ability of the algorithm to predict the future mobility of the node as a function of time and therefore the entire future mobility of the network with a reasonable error. It also showed that the error does not accumulate because the calculation of the predicted value depends on the constructed trajectory polynomial and not directly on the previous values. The analysis of the simulation results showed that the choice of the prediction parameter such as the prediction period T and the timing index tp plays an essential role on finding the optimal polynomial and therefore the prediction of the network topology. These values can then be adjusted to reach the desired accuracy.