Implementation of Random Direction-3D Mobility Model to Achieve Better QoS Support in MANET

Mobile Ad hoc Networks (MANETs) provides changing network topology due to the mobility of nodes. The complexity of the network increases because of dynamic topology of nodes. In a MANET, nodes communicate with each other without the help of any infrastructure. Therefore, achieving QoS in MANET becomes a little difficult. The movement of mobile nodes is represented through mobility models. These models have great impact on QoS in MANET. We have proposed a mobility model which is a 3D implementation of existing Random Direction (RD) mobility model. We have done a simulation on AODV with QoS metrics throughput, delay and PDR, using NS-3 and performed analysis of the proposed mobility models with other 3D mobility models, namely Random Way Point (RWP) and Gauss Markov (GM). It is concluded that our proposed model gives better throughput, delay and PDR for AODV routing protocol in comparing to RWP and GM mobility models. This paper is for students and researchers who are involved in wireless technology and MANET. It will help them to understand how a mobility model impacts the entire network and how its enhancement improves the QoS in MANET. Keywords—Ad Hoc On Demand Distance Vector (AODV); random direction; mobility model; Quality-of-Service (QoS); Mobile Ad Hoc Networks (MANETs); NS-3

Since in MANET, nodes are mobile, therefore it is vital to utilize a mobility model for simulation [1]. Mobility model helps us to represent the node's position and movement with respect to speed, direction, time and distance. In order to relate to real world scenarios, it is essential to represent mobile nodes with varying velocity and way because in reality a mobile node does not progress in a direct line with fixed speed and direction. We have designed and implemented a mobility model in 3D by modifying the 2D Random Direction (RD) mobility model. Several works have been done in the enhancement of Random Direction mobility model. We have used standard routing protocol AODV for performance analysis with QoS parameters throughput, delay and PDR. Simulation is done in NS-3. It is analyzed that our proposed model gives better throughput, delay and PDR for AODV routing protocol. With the growing use of wireless networks in all the fields it has become significant to provide secure and better network communication by improving QoS in MANET. This paper is for students, researchers focusing on wireless networks and MANET. It will provide them a basic idea about the impact of mobility model in providing QoS support in MANET. It will also make them understand how a mobility model is important for simulation in MANET.
The rest of the paper is prepared in the consequent way: Section II discusses the related work. Section III gives the brief overview of the existing mobility model. Section IV illustrates the proposed mobility model. Section V discusses the AODV routing protocol. Section VI shows the experimental results and lastly Section VII concludes the paper.

II. RELATED WORK
Nain et al. [19] considered two variations of Random Direction mobility model with wrap around and with reflection. A simple path-wise relationship has been established for both the models. The authors have shown that if the users are initially uniformly distributed in the movement space with uniform position and direction, then they preserve the uniform distribution for random movement patterns.
Carofiglio et al. [20] proposed a method to improve route efficiency by choosing the most stable path in order to reduce latency and overhead due to route reconstruction. The movement of the node is represented using Random Direction mobility model and the probability of exact and approximate path availability and path duration is derived. The authors also propose an approach to improve the efficiency of the reactive routing protocol.
Gloss et al. [21] shows that the location dependent parameterization of the random direction mobility model can be used to create non-homogeneous mobility scenarios in a very flexible way. In particular the proposed transformation of www.ijacsa.thesai.org traces to RD-LDP parameterizations seems to be a promising approach to gain valuable, realistic mobility models that meet the requirements of stationary simulation techniques. Besides this transformation of traces to RD-LDP parameterizations, scenario creation based on sojourn density or movement guidelines appears to be a valuable method for distinguished simulation studies with non-homogeneous mobility scenarios.
Wu et al. [24] presents space probability distribution functions of the RDM in 3-D and prove it by simulating data. Consequently, the results of this paper are of practical value for performance analysis of Mobile Ad Hoc Network and provide a fundamental basis for the research on some its characteristics, such as, connectivity, average path length, network capacity and so on. Moreover, they provide precise theoretic foundations for derivations, proofs, simulations and applications of Ad Hoc network based on 3-D Random Direction Mobility Model.
Liu et al. [22] enhanced the Random Direction through equipping it with a commonly used, decentralized sense and avoid protocol-sense-and-stop (S&S) to analyze critical networking statistics for the unmanned aircraft system in a 2-D airspace. It is proved that the stationary node distribution in the enhanced model maintains the uniformity regardless of initial distributions. Moreover, it is also shown that the stationary inter-vehicle distance distribution in the enhanced model loses the uniformity.
Junfie et al. [23] introduced two 3-D smooth turn (ST) random mobility models (RMMs) to facilitate the design and evaluation of airborne networks (ANs). Both models are extended from the basic 2D Smooth Turn random mobility model, but differ in motion patterns along the z direction. In particular, the aerial mobility along the z direction is assumed to be independent of the other two dimensions in the zindependent ST RMM, while dependent in the z-dependent ST RMM. The z-independent ST RMM is more suitable for applications with less variation in aerial mobility along the z direction, such as civilian and commercial applications; while the z-dependent ST RMM is suitable for applications involving climbing or descending turns, such as military applications and air shows. Table I gives all the notations and descriptions that are used in this paper.

A. Gauss Markov Mobility Model
It is memory based realistic mobility model proposed by Liang and Haas [15]. Though this model was initially designed for wireless personal communication services (PCS) networks, it is used in MANET for its realistic behavior [10]. At a given time interval ‗t', the speed and direction of each node are estimated on the basis of the previous value of direction and speed at (t-1) th time interval. A tuning parameter, α is used to determine the degree of randomness for computing previous speed and direction. Therefore, this model imitates the characteristics of temporal dependency. The speed, direction and pitch are measured by the given mathematical formulas [11][12] [16][17]: Where , and are the new speed, direction and pitch at time interval t, ̃, ̃a nd ̃ are the mean speed, mean direction and mean pitch, S D and P are random variables and α is a random variable whose value lie within the range of 0< α <1. With the varying values of α, randomness is determined.

B. Random Way Point Mobility Model
This mobility model is often used frequently in Mobile Ad hoc Networks (MANET) as it is simple and easily available in network simulators [12]. It was proposed by Johnson and Maltz [14]. In this model, nodes are initially deployed randomly. Nodes move freely and each node does not depend on the other nodes. This model chooses speed, direction and destination randomly. The working of the model is as follows: Initially the node selects a particular position within the simulation area and considers it as the destination and starts moving towards it with a constant velocity which is uniformly selected from the interval [minimum_velocity, maximum_velocity] [1] [11] [14]. Upon arriving the selected destination, the node pauses for some time called the pause time and once the pause time finish, then the node begins moving on its way to another destination with a new velocity, which is independent of the previous one [1][10] [11] [14]. When the pause time is huge and velocity is minimum then the network topology becomes stable, whereas when the pause time is small and the velocity is maximized then the network topology will become highly dynamic. When the pause time is zero and velocity is selected randomly from the interval [minimum_velocity, maximum_velocity] then the node becomes continuously movable. In this model, the nodes stops unexpectedly, velocity changes abruptly and destination are selected randomly [12]. This model is memory less [14]. www.ijacsa.thesai.org

C. Random Direction-2D Mobility Model
This is a memory less mobility model where the node moves on the basis of a random direction d. At a specific time period ‗t', the speed v(t) of a node is determined as a Gaussian Distribution from the interval [minimum_speed, maximum_speed] and an angular direction d is chosen from the interval [0, 2π]. Considering the node speed, pause time and angular direction, each node moves towards a definite direction until it arrives the boundary of the model. When it arrives the boundary, it pauses, selects a new direction and speed and starts moving towards a new direction [18].
After selection of speed and direction randomly, the velocity of a node in a Random Direction is calculated as: We have shown in Fig. 1, the rectangular simulation boundary of a simulation area with a node for Random Direction-2D. A node can touch a boundary in the following four ways: Case I: When a node touches BC of the rectangular boundary as shown in Fig. 1, then it will bounce backwards, i.e. making the value of the X-axis as negative and Y-axis as either positive or negative and Z axis to zero. The direction (ϴ) of the node should lie within the range of 90 0 to 270 0 .
Case II: When a node touches AD of the rectangular boundary as shown in Fig. 1, then it will bounce rightwards, i.e. making the value of the X-axis as positive and Y-axis as either positive or negative and Z axis to zero. The direction (ϴ) of the node should lie within the range of -90 0 to +90 0 .
Case III: When a node touches AB of the rectangular boundary as shown in Fig. 1, then it will bounce downwards, i.e. making the value of the X-axis as either positive or negative and Y-axis as negative and Z axis to zero. The direction (ϴ) of the node should lie within the range of 180 0 to 360 0 .
Case IV: When a node touches DC of the rectangular boundary as shown in Fig. 1, then it will bounce upwards i.e. making the value of the X-axis as either positive or negative and Y-axis as positive and Z axis to zero. The direction (ϴ) of the node should lie within the range of 0 0 to 180 0 .
Pick a random value of ϴ between 0 to 2 * π ii.
The node in motion reaches the boundary and call the BeginPause().
BeginPause() The node pauses for pause time i.
The node calls ResetSpeedandDirection(). A random point on the surface of a sphere can be calculated using the following steps: 1) Choose a random value of ϴ between 0 and 2π. 2) Choose a random value of z between -1 and 1.
3) Compute the following: The 3D simulation area of a box and a node is shown in Fig. 2. Here, ϴ is used to determine the value of direction which lie within the range (0 0 , 360 0 ) and the value of z lies within the range (-1,1). When a node touches a boundary of the box, then these six cases happens: Case I: When a node touches ABCD wall of the box as shown in Fig. 2, then it will bounce back so that the value of X-axis should be negative irrespective of Y-axis and Z-axis in order to remain within the box. The direction (ϴ) of the node should lie within the range of 90 0 to 270 0 so that Case I holds, such that the values considered for X-axis as negative, Y-axis and Z-axis as either positive or negative and z lie within the range from (-1,1).
Case II: When a node touches EFGH wall of the box as shown in Fig. 2, then it will bounce back so that the value of X-axis should be positive irrespective of Y-axis and Z-axis in order to remain within the box. The direction (ϴ) of the node should lie within the range of -90 0 to 90 0 so that Case II holds, such that the values considered for X-axis as positive, Y-axis and Z-axis as either positive or negative and z lie within the range from (-1,1).
Case III: When a node touches ABEF wall of the box as shown in Fig. 2, then it will bounce back so that the value of Y-axis should be negative irrespective of X-axis and Z-axis in order to remain within the box. The direction (ϴ) of the node should lie within the range of 180 0 to 360 0 so that Case III holds, such that the values considered for Y-axis as negative, X-axis and Z-axis as either positive or negative and z lie within the range from (-1,1).
Case IV: When a node touches CDGH wall of the box as shown in Fig. 2, then it will bounce back so that the value of Y-axis should be positive irrespective of X-axis and Z-axis in order to remain within the box. The direction (ϴ) of the node should lie within the range of 0 0 to 180 0 so that Case IV holds, such that the values considered for Y-axis as positive, X-axis and Z-axis as either positive or negative and z lie within the range from (-1,1).
Case V: When a node touches ACGF wall of the box as shown in Fig. 2, then it will bounce back so that the value of Z-axis should be negative irrespective of X-axis and Y-axis in order to remain within the box. The direction (ϴ) of the node should lie within the range of 0 0 to 360 0 so that Case V holds, such that the values considered for Z-axis as negative, X-axis and Y-axis as either positive or negative and z lie within the range from (-1,0).
Case VI: When a node touches BDEH wall of the box as shown in Fig. 2, then it will bounce back so that the value of Z-axis should be positive irrespective of X-axis and Y-axis in order to remain within the box. The direction (ϴ) of the node should lie within the range of 0 0 to 360 0 so that Case VI holds, such that the values considered for Z-axis as positive, X-axis and Y-axis as either positive or negative and z lie within the range from (0,1).
The velocity of a node in 3D is determined using the following formula: The Flowchart of the algorithm for Random Direction-3D mobility model is shown in Fig. 3, Fig. 4 and Fig. 5, respectively.

Initialize:
Set Rectangular Box Boundary value; S value; pause time value;
i. Pick a random value of ϴ between 0 to 2 *π and z between -1 to 1. ii. Call SetDirectionandSpeed Function ().
i. Calculate the velocity using speed and direction using the following formula: ii. The node in motion reaches the boundary and call the BeginPause Function ().

V. AD HOC ON DEMAND DISTANCE VECTOR ROUTING PROTOCOL
Ad Hoc On Demand Distance Vector (AODV) is a reactive routing protocol where a path is discovered whenever a node wants to exchange information with another node [3][5] [7][9] [25]. It is one of the most popular and efficient routing protocols. This protocol has minimum space complexity because a path is created on demand and also path information is deleted if not required [3]. It provides loop free paths and is scalable for huge networks [2][3] [4]. When a source node wants to exchange information with the destination node and the required path is unavailable, in that case path discovery procedure is initiated and source node broadcasts a Route Request (RREQ) packets to all the neighbor nodes. When the neighbor nodes receive the RREQ packets, if it has the path to the destination or if it is the destination then it sends a Route Reply (RREP) packet else it broadcast the RREQ packet to its neighbor nodes [8]. A source may receive more than one RREP from its neighbor nodes in that case it selects the path with the least number of hops because all the nodes in MANET are mobile so less hop count will lead to a more stable path. Once the destination receives the RREQ packet a reverse path is created to transmit the RREP packet using that path. Once the path is discovered data can be transferred using that path. When a node does not receive any messages from its corresponding neighbor nodes during path discovery procedure then it considers a path breakage. Due to the mobility of nodes, path breakage is obvious in MANET. Whenever a node detects path failure, then Route Error (RERR) packet is transmitted to its corresponding neighbor nodes so that all the associated nodes gets information about the broken path [3][7] [8].

A. Experimental Parameters
We have considered an AODV routing protocol to check the impact of all the 3D mobility models, namely, Gauss Markov, Random Way Point and Random Direction-3D using various group of nodes like 20, 40, 60, 80, 100 and 120 in NS-3. Table II shows all the simulation parameters and values.  Table III, Table IV and Table V represent the parameters and corresponding values for Gauss Markov, Random Way Point and Random Direction-3D mobility models. Since, Random Direction and Random Way point mobility models are memoryless mobility models we have considered the value of tuning parameter as zero (means memoryless) in Gauss Markov to keep the similarity with the other mobility models.

B. Experimental Results
For experimentation, we have considered parameters like throughput, PDR and delay. We have done a huge number of experiments using different set of nodes like 20, 40, 60, 80, 100 and 120 with our presented mobility model, namely, Random Direction-3D (RD-3D) model and other existing mobility models like Gauss Markov (GM) and Random Way Point (RWP) to check their impact on QoS support in MANET. The experiment is also done to analyze the influence of these mobility models on routing protocol AODV.

1) Throughput:
It is interpreted as the number of bits transmitted per second during the exchange of information in a network [5]. This parameter is used here as one of the performance measures to check the effect of mobility models in AODV. The higher the throughput values the better is the QoS. The results for throughput of AODV with a different set of nodes and distinct mobility models are shown in Table VI. It is observed in Table VI that the highest throughput obtained for AODV is 54.5994 kbps using Random Direction-3D for 20 nodes, whereas the least is 4.0318 kbps using Gauss Markov for 20 nodes. It is noticed that for 20, 60, 100 and 120 nodes RD-3D gives higher throughput, whereas GM gives lower throughput as shown in Fig. 6. The average throughput for AODV is better using the RD-3D mobility model in compared to GM and RWP mobility models. a) Delay: It is defined as the total time spends by a node during transmission of data to its destination [5]. We have used delay as one of the performance measures to check the impact of mobility models in AODV. The lower the delay values the better is the QoS. Delay values for AODV are shown in Table VII using a distinct set of nodes and our proposed and existing mobility models. It is observed in Table VII that the highest delay obtained for AODV is 882.2117 seconds using GM mobility models for 120 nodes, whereas the least is 257.0947 seconds using RD-3D for 40 nodes. It is noticed that for all set of nodes except 20 nodes RD-3D gives lower delay values whereas GM gives higher delay values. Moreover, it is also analyzed that the average delay for AODV is lower using the RD-3D mobility model in compared to GM and RWP mobility models as shown in Fig. 7.
b) Packet-Delivery-Ratio: It is expressed as the ratio of total number of data transmitted at the destination to the total number of data generated at the source [5]. PDR is used as one of the performance metrics to analyze the effect of the various mobility models using a different set of nodes on AODV as shown in Table VIII. It is observed in Table VIII that the highest PDR obtained for AODV is 0.8942 using RD-3D mobility models for 80 nodes, whereas the least is 0.4911 using RD-3D for 20 nodes. It is noticed that for 60, 80, 100 and 120 set of nodes RD-3D gives higher PDR values, whereas for 20 and 40 nodes, GM gives higher PDR values. Furthermore, it is also analyzed that the PDR for AODV is better using the RD-3D mobility model in compared to GM and RWP mobility models as shown in Fig. 8.

VII. CONCLUSION AND FUTURE WORK
We have designed and implemented a 3D mobility model by modifying the existing 2D Random Direction mobility model. The proposed mobility model is tested in NS-3 on the routing protocol AODV. The impact of the mobility model is observed using performance measures throughput, PDR and delay. We know that the higher values of PDR and throughput gives better QoS and lower values of delay give better QoS in MANET. It is noticed in Table VI that the RD-3D mobility model gives better throughput in comparison to RWP and GM whereas GM gives the least throughput. One of the reasons for GM giving least throughput is the use of least value of the tuning parameter. Since, we have considered all the memory less mobility models, we have considered the value of tuning parameter of GM as zero. Moreover, it is observed in Table  VII that among the three mobility models RD-3D gives the least delay. Furthermore, from Table VIII it is noticed that the average PDR value is better for RD-3D mobility model in comparison to RWP and GM mobility models. It is concluded that the RD-3D mobility model outperforms well in terms of throughput, delay and PDR in comparing to RWP and GM mobility models. Our model can be further analyzed on other routing protocols like DSDV, DSR, AOMDV, etc.