Keywords

1 Introduction

MANETs is a temporary, dynamic, multi-hop, purpose-specific wireless network, it consisted by mobile nodes(MNs) with wireless transceiver devices, which depend on no default infrastructure and form in a self-organizing fashion. With the development of mobile Internet, MANET has been applied in more and more occasions, especially in impromptu meeting, battlefield communication and emergency rescue [1].

It is difficult and costly to conduct a real-world test-bed for depicting all kinds of dynamic and complicated scenarios, most of research in MANETs are done by simulation [2]. The rationality of a mobility model plays an important role to the accuracy and reliability of the network simulation results [3, 4].

The existing mobility models can be divided into two categories, one is entity movement model, the other is group movement model [5]. The entity movement model emphasizes the independent motion of each node in the network, such as Random Waypoint (RWP) model [7], Markov Random Path (MRP) model [8]. The group movement model emphasizes the correlation and relativity motion of each node, such as the Reference Point Group Mobility (RPGM) model [9]. For a detailed definition, classification and characteristics of mobile models, please refer to [5, 6]. In this work, we focus on the entity movement model study.

The MRP model alleviates the defects of RWP model by introducing probability mechanism, but it brings other problems, such as the node cannot be paused in the whole simulation process, the speed of a node is a constant in the whole simulation process, the moving direction of a node is limited, only can move forward, backward, left 90°, right 90°. To alleviates the defects in MRP, some improved model proposed [10, 11], but it still has only two optional speed values, the motion direction a node is still limited, it has only 8 moving directions.

In order to solve these problems, an mobility model based on Markov chain with pause time and variable speed (TSMRP) is proposed in this work. In this model, the node can be paused in the simulation process, the speed of the node can change smoothly and the moving direction can change arbitrarily through the probabilistic selection mechanism in the simulation process.

The rest of the paper is organized as follows. In Sect. 2, the RWP mobility model and the original MRP model are briefly described, which are closely related our work and widely used in Ad Hoc network simulation. In Sect. 3, we present our TSMRP model in details, including the definition, algorithm, simulation implementation and the analysis. In Sect. 4, we validated and compared our model with RWP and MRP by NS2. Conclusions and the future study are outlined in the last section.

2 Mobility Model of MANET

As the basis of simulation, How to design a mobility model more in line with actual mobile scenarios has been paid more and more attention by researchers in recent years [5, 6, 12]. In the next, we only briefly introduce the RWP mobility model and MRP mobility model, which are used in the following chapters.

2.1 RWP Mobility Model

Random Way Point (RWP) [7] is widely used because of its simplicity and easy implementation. Many typical simulation studies in MANETs are based on this mobility model [5, 6, 12, 13]. In this model, the moving style of nodes are generally described as follows: i) the nodes are stochastically suspended for a period of time; ii) a destination location is randomly selected in the simulation area and moved to the destination at a random speed v, where v obeys the uniform distribution between [minspeed, maxspeed]; iii) after arriving at the destination, repetition process i) and ii) until the end of the whole simulation. The initial position of each node is randomly distributed and the rebound boundary rule is adopted.

RWP model is a non-memory mobility model. because of the velocity attenuation, the random selection of velocity is very important in this model. Under the same average velocity, the larger velocity and the longer pause time will produce a more stable network topology. RWP model truly reflects the basic law of entity movement, and has a good reality. NS2 has its own implementation of this model. Therefore, RWP model has been used in many typical simulation studies of network protocols, and has been seemed as a benchmark mobility model [14].

2.2 MRP Mobility Model

The Markov Random Path Model (MRP) [8] uses a probability matrix to determine the location of the mobile node at the next moment. It uses three different states (states 0, 1, 2) to identify the location of the node in the X direction and the Y direction. State 0 denotes the current position of the node in the X or Y direction, State 1 denotes the front position of the node in the X or Y direction, and State 2 denotes the position of the node in the next X or Y direction that the node will move in the current direction. The state transition diagram is shown in Fig. 1. The state transition matrix obtained from the state transition diagram is shown in Formula (1).

$$ P = \left[ {\begin{array}{*{20}c} {p\left( {0,0} \right)} & {p\left( {0,1} \right)} & {p\left( {0,2} \right)} \\ {p\left( {1,0} \right)} & {p\left( {1,1} \right)} & {p\left( {1,2} \right)} \\ {p\left( {2,0} \right)} & {p\left( {2,1} \right)} & {p\left( {2,2} \right)} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 0 & p & p \\ q & {1 - q} & 0 \\ q & 0 & {1 - q} \\ \end{array} } \right] $$
(1)

Each P (a, b) in the matrix represents the transition probability of the node from state a to state b. The positions of nodes in the X and Y directions are updated by the values of the elements in the matrix.

Fig. 1.
figure 1

State transition diagram of MRP model

MRP model is a mobility model with memory. Compared with the nodes randomly moving in RWP mobility model, the nodes in MRP moving more smoothly by probabilistic. So it can reflect the real mobile mode much better. A notable feature of this model is that the probability of the node moving in the same direction is higher than changing direction. Therefore, it alleviates the sharp stopping and turning problem in RWP model.

3 A Markov Mobility Model with Pause Time and Variable Speed

As mentioned in Sect. 1, MRP model tries to achieve more realistic movement by introducing probability selection mechanism, but it also brings other problems. The TSMRP model is proposed in this paper solves the above problems by matching the state of Markov chain with the motion behavior, instead of the original state and position.

3.1 TSMRP Model Definition

Similar to MRP mobility model, TSMRP model still uses two discrete-time Markov chains to represent the movement of nodes in the X direction and Y direction respectively, and the movement in the X direction and the Y direction are independent of each other. As shown in Fig. 2, the TSMRP model still uses three different states (states 0, 1, 2) to identify the positions of nodes in the X and Y directions. State 0 denotes the current position of the node in the X or Y direction, State 1 denotes the front position of the node in the X or Y direction, and State 2 denotes the position of the node in the next X or Y direction that the node will move in the current direction. Unlike the MRP model, we add the state transition from state 0 to state 0 itself, and change the original node’s moving distance per step to a unit time per step. Thus, the distance between two adjacent positions in the same direction is the product of the random velocity v and the unit time interval T. The state transition matrix obtained from the state transition diagram is shown in Formula (2). P (a, b) denotes the transition probability of mobile nodes from state a to state B, \( a,b \in \{ 1,0,2\} \). If all P (a, b) are obtained, then the movement of nodes can be controlled by the state transition matrix P.

$$ P = \left[ {\begin{array}{*{20}c} {p\left( {0,0} \right)} & {p\left( {0,1} \right)} & {p\left( {0,2} \right)} \\ {p\left( {1,0} \right)} & {p\left( {1,1} \right)} & {p\left( {1,2} \right)} \\ {p\left( {2,0} \right)} & {p\left( {2,1} \right)} & {p\left( {2,2} \right)} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {1 - 2p} & p & p \\ q & {1 - q} & 0 \\ q & 0 & {1 - q} \\ \end{array} } \right] $$
(2)
Fig. 2.
figure 2

State transition diagram of TSMRP model

3.2 Description of TSMRP Model

As mentioned above, compared with the original MRP model, TSMRP adds state transition from state 0 to state 0 itself (transition probability is 12p). In this way, we can express that the mobile node stays at the current position by the self-transfer of the mobile node in the current state 0, and the length of the pause time of the mobile node varies with the number of self-transfer of the state 0. At the same time, we can find that the distance of each movement is no longer a constant of unit distance, but the product of the random velocity v and the time interval T. Because of the difference of the random velocity produced in X and Y directions, the composite velocity and direction will not be fixed. This means that the direction and velocity of the node can be changed arbitrarily, while the original MRP model has only four directions and one constant velocity; the improved SIMM model has only nine directions and two constant velocity values.

The three models of MRP, SIMM and TSMRP are based on Markov process. They use two discrete-time Markov chains to represent the movement of nodes in the X direction and Y direction respectively, and the movement in the X direction and Y direction is independent of each other. In this way, we can combine the two chains and get a two-dimensional Markov chain to describe the motion of nodes in the two-dimensional region. The specific state transition diagram is shown in Fig. 3. The former number in parentheses represents the state in the X direction, and the latter number represents the state in the Y direction.

Fig. 3.
figure 3

Two-dimensional state transition diagram of TSMRP model

As shown in Fig. 3, we can express the node’s movement in the plane by state transition. Further, we can conclude that the TSMRP model has the following properties:

  1. (1)

    In the current state (0, 0), the probability of a time interval for a mobile node to stay in place is (12p)2; the probability of moving one time interval in four directions, namely, east, south, West and north, is p(12p); and the probability of moving one time interval in east-south, east-north, west-south and west-north are all p2. The larger the probability parameter p is, the more mobile the node will be.

  2. (2)

    In the current state (2, 0), the probability that the mobile node keeps moving eastward for one time interval is (1q)(12p); the probability of moving westward for one time interval is p(12p); the probability of moving eastward South and eastward North for one time interval is p (1q); the probability of moving westward South and northwest for one time interval is pq. It can be seen that if P is larger, with the decrease of q, the probability of sharp rotation (direction change 180°) will become smaller and smaller. When the current state is (1, 0), (0, 1), (0, 2), the motion situation is similar to (2, 0), and it is not elaborated one by one.

  3. (3)

    In the current state (2, 2), the probability that the mobile node keeps moving one time interval in the northeast direction is (1q)2; the probability of moving one time interval in the south-east direction and the north-west direction is q(1q); and the probability of moving in the southwest direction is q2. It can be seen that with the decrease of q, the probability of sharp rotation (direction change 180°) will become less and less. When the current state is (1, 1), (2, 1), (1, 2), the motion situation is similar to (2, 2), which is no longer elaborated one by one.

In particular, MRP model is a special case when TSMRP model sets p to 0.5 and the speed set to a constant. When setting p to less than 0.5 and the speed set to a constant, it is the SIMM model proposed in reference [10, 11].

3.3 TSMRP Node Mobility Algorithms

In view of the fact that node movement in MRP model does not have pause time and the moving speed is constant, and the limitation of node speed and direction in improved model SIMM, we propose an improved algorithm. The specific TSMRP model node movement algorithm is as follows:

Step1. Initialize, set the number of nodes N, simulate the size of scene [xRange, yRange], simulate the t totalTime, the length of time Interval per unit timeinterval, the probability parameters p, q, the maximum speed of X and Y direction xMaxSpeed, yMaxSpeed.

Step2. Cycling N times, the initial distribution of N nodes is generated randomly. The initial states of X and Y directions of all nodes are 0, that is, xState = 0, yState = 0.

Step3. Location updates until the end of simulation time.

figure a

3.4 TSMRP Model Simulation Implementation

Compared with other entity mobility models, TSMRP model is more versatile and controllable. Different mobile scenarios can be simulated by setting different probability parameters simply. We implement the model in C++ under Linux, and use Gnuplot to plot the trajectory of a single node. The simulation scenario is 500 m × 500 m. The initial position of the node is (250, 250) and the total simulation time is 100 s. The time interval of state updating is 5 S. The maximum speed is 10 m/s. As shown in the following figures.

The probability parameters p = 0.4 and q = 0.3 set in Fig. 4. It can be seen from the figure that the pause time of nodes is shorter during the whole movement process, and there are few sudden stops. This can be used to simulate people’s daily movement, because people tend to move in the same direction after completing their daily work, rarely turning suddenly and rarely repeating the road they take.

Fig. 4.
figure 4

P = 0.4, q = 0.3

The parameters p = 0.45 and q = 0.05 set in Fig. 5. From the figure, it can be seen that there are almost no pauses and few changes in the direction of motion during the whole process, which can be used to simulate the real vehicle driving on the road.

Fig. 5.
figure 5

P = 0.45, q = 0.05

The probability parameters p = 0.05 and q = 0.3 set in Fig. 6. It can be seen from the figure that the suspension time of nodes is longer during the whole movement process, which can be used to simulate the movement of disaster scene, meeting scene.

Fig. 6.
figure 6

P = 0.05, q = 0.3

The parameters p = 0.05 and q = 0.05 set in Fig. 7. It can be seen from the figure that the suspension time of nodes is long and the direction of nodes is seldom changed during the whole process, which can be used to simulate the traffic situation of vehicles in urban streets.

Fig. 7.
figure 7

P = 0.05, q = 0.05

4 Simulation Comparison

4.1 Building of Simulation Environment

In this section, we compared our model with the widely used RWP model and the original MRP model by NS2. The MRP model is implemented in C++ language under Linux, and the mobile scene of RWP model is generated by Setdest tool of NS2. The main simulation parameters are as follows: the size of simulation scenario is set to 1000 m × 1000 m; the number of nodes in the scenario is 50, and the transmission range of each node is set to 250 m; the maximum speed of node movement varies from 5 m/s to 30 m/s; 30 pairs of random data streams are generated by Cbrgen tool of NS2, in which the size of data packets is 512 bytes. The transmission interval is 0.5 s and the simulation time is 1210 s. The probabilistic parameters of MRP model are set to p = 0.5, q = 0.3 [4], the probabilistic parameters of TSMRP module are set to p = 0.3, q = 0.3, and the time interval of node update status is set to 2 s. In order to overcome the influence of initial distribution of nodes and clearing pipeline at the end of simulation, we only collected data between 600 s and 1200 s. Each data is averaged by running 10 mobile scenarios.

The routing protocol we choose here is Dynamic Source Routing (DSR) [7]. DSR is a reactive on-demand routing protocol. It does not periodically broadcast routing information to maintain the entire network topology, and only establishes routing when the source node needs data transmission.

This paper compares and analyses the impact of mobility model on DSR protocol performance from four main indicators of protocol evaluation, namely, packet delivery rate, average end-to-end delay, average hop count and routing load.

4.2 Comparison and Analysis of Simulation Results

Packet delivery rate refers to the ratio of the number of packets received by each node’s application layer to the number of packets sent by each node’s application layer in the whole simulation process, which is used to measure the data transmission and data loss of each node in the network. Figure 8 shows how the packet delivery rate varies with the node’s moving speed under three mobile models: RWP, MRP and TSMRP. It can be seen that with the increase of node speed, the whole network topology changes faster and faster, and the packet delivery rate of nodes under each model decreases in varying degrees. The grouping delivery rate under MRP model is the lowest, while RWP and TSMRP are close. With the increase of speed, the grouping delivery rate under TSMRP model has a better trend than that of RWP model.

Fig. 8.
figure 8

Speed vs. data packets delivery ratio

Average end-to-end time delay refers to the average time interval between the sending node’s sending time and the receiving node’s application layer’s receiving time, which is used to measure the real-time performance of protocol data transmission. Figure 9 shows how the average end-to-end delay varies with the node’s moving speed under three mobile models. It can be seen that the average end-to-end delay of TSMRP model is the shortest and the most stable, while that of RWP model changes dramatically with the change of speed.

Fig. 9.
figure 9

Speed vs. end-to-end delay

The average hop count is the ratio of the total number of messages sent in the network (including those successfully sent and forwarded by intermediate nodes) to the total number of messages received successfully. Combined with packet delivery rate, this index can measure the effectiveness of routing protocols. If the packet transmission rate is high and the average hop count is low, it indicates that the protocol is only valid in the range of fewer hops, and the protocol will fail with the increase of hops. Figure 10 shows how the average hop number varies with the node’s moving speed under three mobile models. It can be seen that DSR protocol is stable under three models. At the same speed, the average hops of MRP model and TSMRP model are higher than those of RWP model. At the same time, the joint Fig. 8 shows that the DSR protocol in RWP model is only valid in the range of fewer hops. This shows that the problem of nodes moving only near the initial position in RWP model can be alleviated by probabilistic mobility.

Fig. 10.
figure 10

Speed vs. average hop count

There are many definitions of routing load. Here we take the most accepted definition in academia, that is, the number of routing packets needed to send a packet. This index can be used to measure the efficiency of routing protocols. Figure 11 shows how the routing load varies with the moving speed of the nodes in three mobile models. It can be seen that under the three models, the routing load increases significantly with the increase of speed, because the increase of speed leads to the acceleration of network topology changes, resulting in DSR protocol need to send more routing requests, and the routing maintenance time is shortened. Because there is no pause mechanism in MRP model, its topology changes most frequently, which leads to the highest routing load in MRP model.

Fig. 11.
figure 11

Speed vs. routing overhead

From Fig. 7 to Fig. 10, we can see that TSMRP model effectively alleviates the phenomena of sudden turning and short moving range of nodes in RWP model by introducing probabilistic mobility mechanism, and solves the problem that nodes in MRP model must move at the same speed until the end of simulation by introducing pause mechanism and variable speed mechanism. This also makes TSMRP more realistic than the other two models. At the same time, we can see that the performance evaluation results of DSR protocol under these three different mobile models are very different. Therefore, it is particularly important to select a suitable mobile model in protocol evaluation.

5 Conclusion

This paper reviews the research progress of current entity mobility model. To overcome the shortcomings of MRP mobility model in which the node speed is single and the node cannot pause in the whole simulation process, by introducing probabilistic mobility, variable speed and suspend mechanism, a time-Speed Markov Random Path mobility model (TSMRP) is proposed, which can better reflect the real node movement law and has strong independent and controllable parameters. This model corrects the shortcomings of MRP model that nodes do not have pause time and nodes can only move at a uniform speed in the simulation process, and effectively alleviates the phenomenon of sudden stop in entity mobility model. The simulation implementation of the model shows that by adjusting the probability parameter p and q, it can effectively simulate various typical mobile scenarios, and has more versatility. The results of model comparison show that TSMRP model is more stable than RWP model and original MRP model, and it also shows that different mobile models have a greater impact on the performance of Ad Hoc network protocols. Therefore, in the process of network protocol design and network simulation, it is necessary to select or design appropriate mobile models according to different application scenarios and application requirements.

In the future, there are two directions to extend our work. We will give more mathematical derivation, such as the spatial probability distribution of the nodes in our model and the proof of our model is stable enough. We only evaluated the DSR protocol in this work, to valuate much more protocols and design suitable protocols are another interesting direction to extend our work.