Background technology
Vehicular ad hoc network (Vehicular Ad-hoc Networks, be called for short VANET) be the network of distributed a, self-organizing, be equipped with moving vehicle (being called for short node herein) and the roadside unit (RoadsideUnit of radio receiving transmitting module, be called for short RSU) composition, communication pattern comprises ad hoc multihop communication between node (V-2-V:Vehicle toVehicle) and communicate between node with RSU (V-2-I:Vehicle to Infrastructure).
Vehicular ad hoc network is as one of intelligent transportation system important foundation, very important application [1] is had in alleviation traffic congestion, Real-Time Sharing transport information, safe early warning and assistance driving etc., just becoming the study hotspot of industrial quarters and academia at present, and MAC protocol how to make multiple user rationally, effectively utilize radio channel resource, its quality directly has influence on each index such as throughput, channel utilization, is a crucial technology in vehicular ad hoc network.Vehicular ad hoc network is a kind of special mobile ad-hoc network, has vehicle termination translational speed fast, the dynamic change of network topology height, and business randomness produces, and supports sudden high-priority service, the features such as traffic safety class business is real-time.Based on above feature, the MAC protocol of vehicular ad hoc network, compared with the MAC protocol of traditional mobile ad-hoc network, more has following challenge newly: 1. vehicle node high-speed mobility except having the problems such as the access fairness of access interference, concealed terminal and node; 2. communication link frequently ruptures; 3. vehicle mobile context variation, needs the extensibility of MAC protocol strong; 4. higher channel utilization is had; 5. the timely broadcast of emergency safety information in vehicular ad hoc network is supported.
Relevant item research shows, efficient channel allocation mechanism can significantly improve the performance of MAC protocol, ensures good communication quality.First, channel allocation can reduce access delay widely fast, ensures the safety applications in vehicular ad hoc network.Secondly, less conflict can improve the reliability of communication, reduces again competition slot and again transmits the probability of data, improve utilance and the capacity of channel, minimizing packet loss.So how to design the key and difficult point that effective channel allocation mechanism is MAC protocol in vehicular ad hoc net.
Based on the channel access mode of competition, most typical MAC protocol is CSMA/CA, node is before transmission packet, first monitor a period of time, if find channel idle, then start to send data, monitor simultaneously and whether have conflict to occur, if conflict, then random back a period of time, then repeat aforesaid process of transmitting.CSMA/CA agreement is a kind of random competition mode, is full distributed, can utilize limited radio channel resource fully.802.11p standard is the special communication protocol standard for onboard wireless self-organizing network unique at present, and it forms primarily of two parts protocol specification: physical layer (PHY Layer) agreement and media access control layer (MAC Layer) agreement.Wherein, physical layer adopts the 802.11a agreement improved for high-speed mobile dynamic environment, and MAC layer still have employed 802.11 agreement traditional C/S MA/CA mechanism carrys out sharing wireless channel.802.11DCF MAC protocol devises four handshake mechanisms on CSMA/CA protocol basis, namely first node sends a RTS before sending data, wait for that destination node starts to transmit data after responding CTS, destination node responds an ACK after receiving data, so just effectively solves the problem of concealed terminal and exposed terminal.CSMA/CA agreement is a kind of share medium mode based on carrier sense competition mechanism, and therefore, the improvement MAC protocol based on it is easy to cause conflict in the vehicle environmental that density is large, thus causes large time delay, even causes network congestion.Be not suitable for the safety applications in vehicular ad hoc network; This agreement can not ensure that node in network can Fairshare bandwidth, because have superiority more weak than signal strength signal intensity of region that signal strength signal intensity is high, cause capture effect thus, this region made obtains more allocated bandwidth in transmitting procedure.
TDMA/FDMA/CDMA MAC protocol, namely in time, be many sub-channels by channel distribution in frequency range or in orthogonal code, node needs to preengage before sending data and obtains at least one subchannel, therefore how to manage with allocated sub-channels very important.ADHOC improves R-ALOHA agreement, have employed TDMA model split wireless channel, node need in frame information FI (Frame Information), record the situation that oneself viewed neighbor node takies time slot, and in the time slot oneself taken periodic broadcast FI information.Access node by intercepting FI information, the effective slot contention of Stochastic choice.VeMAC agreement is a kind of new MAC protocol of the multichannel system design being vehicular ad hoc network based on TDMA, this agreement adopts ADHOC protocol on Main control channel, be left and right, RSU tri-kinds unlike VeMAC by the time-slot division on Main control channel, first corresponding node competes corresponding time slot.Service channel adopts the TDMA method of salary distribution of master control.This quasi-protocol effectively can reduce node competition conflict, comparatively speaking, be suitable for VANET network environment based on ADHOC protocol comparison, and periodically broadcast also can be applied with active safety and combined, as long as add the running datas such as speed, position, direction in broadcast message.But the method dividing subchannel needs complicated dispatching algorithm, fixing frame length cannot adapt to the change of the node density in network, the area channel utilance little in density is extremely low, may make some node cannot access network in the area that density is large, time serious, traffic accident may be there is in active safety is answered.This quasi-protocol does not solve the access interference in vehicular ad hoc network yet and merges collision problem.
Summary of the invention
The object of this invention is to provide a kind of vehicular ad hoc network network self-adapting time slot distribution method based on TDMA, CSMA/CA agreement and the improvement MAC protocol based on it is adopted easily to cause access interference in the vehicle environmental that density is large to solve method for channel allocation in current vehicular ad hoc network, cause the problem that time delay increases, and adopt the fixing long agreement of tdma frame to cause low at node sparse region channel utilization, may make some node cannot the problem such as access network in the area that density is large.
The present invention is for solving the problems of the technologies described above and providing a kind of vehicular ad hoc network network self-adapting time slot distribution method based on TDMA, and the step of this slot allocation method is as follows:
1) by the time-slot division of time frame each in vehicular ad hoc network be left and right two time slot collection, the mobile node for access network is divided into left and right two sets of node according to its direction, and the node of left/right set of node competes the time slot of corresponding left/right time slot collection;
2) node listens channel one-period, the position of collecting its two-hop neighbor node and the gap information taken, set up an effective time slot collection;
3) current according to node geographical location information concentrates selection time slot determined to be at war with from effective time slot.
Described access each node in vehicle-mounted adaptive network according to the message of its neighbor node, calculate two-hop neighbor node number, whether the ratio of decision node and time slot exceedes max-thresholds or is less than minimum threshold, to be doubled by its frame length or reduce by half according to judged result.
After described node successful contention to time slot, keep intercepting channel, collect its two-hop neighbor node information, calculate left and right two-hop neighbor node number, according to the change of left and right interstitial content, regulate the ratio of left and right time slot collection, make the ratio of left and right time slot equal the ratio of left and right node density.
Described step 3) in slot contention process as follows:
A. wait to compete the node node nearest according to distance oneself on the same direction of geographical positional information calculation;
B. the node that judging distance oneself is nearest is at oneself front or rear, if in front, effective slot contention that the time slot front shared by node that then chosen distance oneself is nearest is numbered recently, if in the wings, then effective slot contention that the time slot rear shared by node that chosen distance oneself is nearest is numbered recently.
Described step 3) if in enter simultaneously network at least two nodes, then according to relative position between last broadcast message decision node, to determine effective time slot that each node is corresponding, if node clashes when competing " unique time slot ", in the competition of next round, node is with regard to Stochastic choice effective time slot.
The number of nodes of each node in described network at any time in monitoring network, if certain node finds that its nodes observed exceedes max-thresholds with time slot ratio, in the time slot just taken at this node, broadcast one doubles the suggestion of frame length, and all node broadcasts packets with identical frame length received in one-period afterwards all represent and have received this suggestion, then this node is advised successfully, and namely later radio communication will adopt the frame length doubled; If the nodes that certain node is observed compares lower than set point with time slot, and the nodes that whole hop neighbor nodes of this node are observed compares all lower than minimum threshold with time slot, the suggestion of the broadcast frame length that reduces by half in the time slot just taken at this node, and in one-period afterwards, do not receive the opposing views of surroundings nodes, then this node reduces by half to adopted frame length, and other nodes keep original frame length.
Effective time slot collection of described node is the time slot collection not shared by the two-hop neighbor node of this node.
The described unidirectional node that belongs to can according to the tandem between positional information decision node, each node knows the node before and after oneself and the time-gap number shared by them, the frame of TDMA is used as the structure of a circulation, specify one " front " to, under desirable scene, the order that unidirectional all nodes take time-gap number is consistent with time slot position order.
The invention has the beneficial effects as follows: the present invention adopts tdma frame structure, each frame is divided into two the time slot collection in left and right, some time slots are comprised in each time slot collection, node is divided into left and right set of node according to its moving direction, the node in left/right set of node according to current geographical location information according to the competition slot in certain rules selection left/right time slot collection.In order to adapt to the change of node density, whether the ratio of node decision node and time slot after successfully accessing channel exceedes max-thresholds or is less than minimum threshold, if so, then doubles or the frame length that reduces by half; If not, judge whether the timeslot number of left/right time slot collection is greater than max-thresholds or is less than minimum threshold, if so, then regulate left and right time slot collection number of time slot ratio to adapt to the change of the right and left interstitial content, the present invention decreases the access interference that node occurs and the probability merging conflict to a great extent; And according to the node density change that node perceived arrives, adjust frame length dynamically, to meet the demand that node accesses channel fast; Prove that the present invention has lower time delay by theory analysis and emulation experiment two aspect, compared with existing protocol, the present invention has less conflicting nodes quantity, higher channel utilization, and is with good expansibility.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is further described.
The present invention reduces node conflict to improve node access delay, time slot is divided into two the time slot collection in left and right, node is divided into left and right set of node according to its moving direction, slot contention in node corresponding selection left/right time slot collection in left/right set of node, then node determines the competition slot of " uniquely " according to the geographical position of oneself, the probability clashed with the time delay and node that reduce node access channel.In the present invention, each node can use different frame lengths, each active node only uses a time slot in its corresponding time frame, the length of time frame carries out expanding and shrinking with the power of 2, two, the left and right time slot collection of each frame represents with L and R respectively, node take meridian line as benchmark, two sets of node in left and right are divided into, as shown in Figure 1 by its moving direction.Effective slot definition is not by the time slot that two-hop neighbor node takies, and in order to avoid access interference, the node within the scope of double bounce can not take identical time slot, and the frame length of two adjacent nodes can only be equal or two times relations.For a node, the nodal information in its double bounce neighborhood can be mapped to a time slot binary tree, and as shown in Figure 2, left and right time slot set pair answers the left and right child node of binary tree, and in Fig. 2, black part is divided and represented left time slot collection, and grey parts represents right time slot collection.
In binary tree structure, root node (root) is at 0 layer, and the node of the i-th+1 layer, by the node generation of i-th layer, is numbered c for one
ithe node of (binary number), its left child node be numbered 0c
i, right child node be numbered 1c
i, for L layer, son node number is 2
l, each node layer number of binary tree is corresponding frame length (number of time slot of each frame), and the numbering of each child node is corresponding with timeslot number.
The concrete steps of the vehicular ad hoc network network self-adapting time slot distribution method based on TDMA of the present invention are as follows:
1. be two, left and right time slot collection by the time-slot division of frame each in vehicular ad hoc network, represent with L and R respectively.When node x prepares access network, first judge current moving direction according to the GPS module of self, the moving direction according to oneself selects corresponding time slot collection L or R.
2. intercept one-period, the gap information collected the position of this node two-hop neighbor node, direction and take.
3. set up an effective time slot collection A according to collecting information
x, from A
xmiddlely determine " uniquely " time slot according to current geographical location information, as shown in Figure 4, for a node x, we illustrate that the competition process of node is as follows:
First node x calculates the nearest node y of distance oneself on same direction, then be at oneself front or rear according to geographical location information decision node y, if in front, then select effective slot contention that the time slot j front taken from node y is numbered recently, if in the wings, then select effective slot contention that the time slot j rear taken from node y is numbered recently.And multiple node is entered simultaneously to the situation of network, then according to relative position between last broadcast message decision node, to determine effective time slot that each node is corresponding, if node clashes when competing unique time slot, then in next round competition, node is with regard to Stochastic choice effective time slot.
The present invention is according to the direction of node and geography information distribution T DMA time slot, the access interference (multiple node competes the conflict that identical time slot produces simultaneously) that can effectively reduce between node conflicts with merging, and (two nodes be in outside double bounce scope can use identical time slot simultaneously and can not clash, but along with the movement of node, will clash when two nodes are within a jumping communication range, cause node to send information failure, need again to compete new time slot).The node that merging conflicts mostly occurs in movement in the other direction takies identical time slot or mobile node uses the scene of identical time slot with fixing RSU, vehicular ad hoc network self-adapting time slot distribution mechanism based on TDMA of the present invention competes different time slot collection for the node of different directions, so just greatly reduces the probability occurring to merge conflict.
In order to improve the success rate of node slot time competition further, this time slot assignment mechanism is made to have extensibility, after node successfully competes time slot, still keep intercepting channel, collect the information of two-hop neighbor node, calculate the density of surroundings nodes, judge whether the quantity of effective time slot of the left and right time slot collection of a frame is greater than max-thresholds or is less than minimum threshold, namely whether meets inequality (3).Suppose during beginning that in network, left and right number of nodes is in stability formula, namely meet equation (2); Along with the movement of node, node density constantly changes, when left and right interstitial content gap increases, and its ratio is when meeting inequality (3), regulate the ratio of left and right time slot collection, the ratio of left and right time slot is made to equal the ratio of left and right node density, namely inequality (4) is met, now node just broadcasts the message of adjustment left and right time slot ratio in the slotted messages of oneself, if the one hop neighbor node all with identical frame length is not all opposed, when then having identical, the node of frame length just redistributes left and right time slot, and the adjustment of its left and right time slot as shown in Figure 4.
Wherein N
(x)for the two-hop neighbor node number of node x, N
l (x)node x left direction two-hop neighbors number, N
r (x)the two-hop neighbors number of node x right direction, S
(x)the frame length of node x, the number of time slots namely comprised inside each time frame, S
l (x)the number of time slot in the left time slot collection of node x, S
r (x)the number of time slot in the right time slot collection of node x, U
maxand U
minbe respectively maximum threshold and minimum threshold, be defined as the ratio of node density and frame length.
The present invention in above-mentioned time slot allocation procedures when node density is less, free timeslot will be relatively many, channel utilization is caused to decline, and when node density is larger, fixing frame length cannot meet for each peer distribution time slot, node may be caused to isolate, make it with out of touch around, cause serious security incident, the function of the present invention's frame length when time slot allocation procedures also add dynamic retractility for this reason, namely each node can regulate the frame length of oneself according to the Biomass dynamics of surroundings nodes, and its detailed process is as follows:
The number of nodes of each node in one network at any time in monitoring network, once there be node to find, its double bounce nodes observed is greater than U with time slot ratio
maxjust in the time slot oneself taken, broadcast the suggestion (being included in FI packet) that doubles frame length, if the broadcast data packet of all nodes received in one-period afterwards all represents that receiving this advises that (namely all nodes with identical frame length all find that two-hop neighbor node number is greater than U with time slot ratio
max), so this node is advised successfully, just adopts the frame length doubled in radio communication afterwards, equally, when certain node finds that its nodes observed and time slot ratio are lower than U
minand its whole neighbor node has this situation, then broadcast the suggestion of the frame length that reduces by half, if do not receive the opposing views of surroundings nodes in one-period afterwards, so this node reduces by half the frame length self adopted, but other node does not reduce by half thereupon together.As shown in Figure 6, we illustrate the dynamic adjustment process of frame length with an example, in a linear network, the initial frame length of node 3 is 8, and it sets up the binary tree of 4 layers according to the information of neighbor nodes of surrounding, and is mapped on the leaf node of binary tree by existing neighbor node gap information, due to movement, the threshold value that the surroundings nodes density of node 3 exceedes, need frame length to double to become 16, the concrete grammar being doubled frame length by binary tree is as follows:
1) using the leaf node of last for binary tree one deck as father node, each leaf node expands to two child nodes, and now time slot binary tree has become five layers from original four layers, achieves doubling of frame length.
2) neighbor information of double bounce is mapped on new time slot binary tree, if l layer leaf node i has distributed to node x, if the frame length of x is 2
l, then two child nodes of leaf node i also distribute to node x, if the frame length of node x is 2
l+1, then the left child nodes of leaf node i distributes to node x, and right child nodes is idle node, for distributing to the node of new access network.As shown in Figure 7, the frame length of node 1 and node 2 is 8, so the child nodes being numbered two father nodes of 000 and 010 of the 4th layer also distributes to node 1 and node 2, the frame length of node 8 is 16, so the left child nodes being numbered the Fu Jiedian of 0011 distributes to node 8, right child nodes is free timeslot.
Frame length is reduced by half with to double frame length similar, if node x needs frame length to reduce by half, its presently used time slot is i, if the brotgher of node of i is free timeslot, then x uses the father node of node i, deletes node i and its brotgher of node, if the brotgher of node of i is used by other nodes simultaneously, then x reselect a child nodes all not by use father node as oneself time slot, to realize reducing by half of frame length.
Parameter U
maxand U
minhow to select is a key issue, and it directly has influence on the utilance of channel and the access interference probability of node, works as U
max→ 1 and U
min→ 0.5, channel utilization is maximum, because the utilance convergence of channel is 1 when the density of node is enough large, but may compete same time slot due to more node, the access interference of node be maximized, works as U
max→ 0.5 and U
min→ 0, owing to there being a lot of free timeslots to cause the utilance of channel very low, but the access interference of node is also minimum simultaneously.
The present invention analyzes the average delay τ of nodes access channel, and access delay is defined as node request access network to start to this time period of time slot of successful contention.Suppose: all competition nodes all belong within same double bounce scope, and have identical neighbor node; At the end of each time frame, all nodes can both know that neighbor node takies gap information and competition success or not; Suppose have K node to compete N number of time slot when n in frame length, last each node obtains a time slot.If it is P at this probability of taking turns competition slot that node x determines, suppose that each node has identical competition success rate, then node x each to take turns successful contention to the probability of time slot be S.In order to maximize the competition success rate of node, we establish a function f (x), and when P meets equation (6), f (x) will obtain maximum, as shown in equation (7).
Because the present invention can change frame length dynamically, always meet N>K, so the value of S is represented by equation (8).Suppose that the node competition success rate of the first round is by S
1represent, because time slot is divided into two kinds, left and right, then S
1calculating formula as shown in (9).U
1represent that each takes turns the interstitial content of successful contention to time slot.After first round competition, for the node that is assigned to time slot selects competition slot regularly according to their actual position information each, suppose that remaining time slot and node are all divided into m subset according to geographical position, then the competition success rate of i-th competition (namely in i-th time frame) node is S
i, success count is u
i.
u
1=S
1*K (10)
After n time slot, the node total number supposing to obtain time slot is K
sif all nodes all successful assignment of a time slot, then demand fulfillment condition K
s=K, we define each take turns after successful contention to the node probability of time slot be
Fig. 8 is node competition probability of success P
scomparison in several existing MAC protocol.Fig. 9 is the interstitial content that several existing MAC protocol becomes distribution of work time slot in each frame length.ADHOC agreement interior joint Stochastic choice competition slot, time slot is divided into three sub-slots collection by VeMAC agreement, and node concentrates Stochastic choice competition slot at the time slot of correspondence.
Suppose that each frame length is t, as can be seen from Figure 8, work as N=64, during K=50, the node of more than 95 percent obtains time slot ATSA agreement of the present invention needs 3 frame lengths, i.e. time delay τ=3t, VeMAC agreement needs 4 frame lengths, time delay τ=4t, ADHOC agreement needs 4 frame lengths, time delay τ=4t; Work as N=204, during K=20, the node of more than 95 percent obtains time slot, and ATSA agreement needs 4 frame lengths, i.e. time delay τ=4t, VeMAC agreement needs 5 frame lengths, and time delay τ=5t, ADHOC agreement needs 6 frame lengths, time delay τ=6t.As can be seen from the above data, ATSA agreement at least can reduce by the access delay of 20% relative to VeMAC agreement, and at least can reduce by the access delay of 30% than ADHOC agreement.And as can be seen from Figure 9, as N>K, agreement proposed by the invention can make node access channel fast, and as K=N, this advantage is just more obvious.
In order to verify the mechanism of the adaptively changing frame length that the present invention proposes, prove that the agreement that the present invention proposes is with good expansibility, this experiment using a series of random numbers of producing at random density as node, the whether adaptive change along with the change of node density of checking frame length.We are arranged
figure 10 shows simulation result, and Figure 11 is a fragment in the Figure 10 intercepted.In Figure 11, the solid line of black represents the number of node, the represented by dotted arrows frame length of grey.Clearly can find out that from figure the ATSA agreement that the present invention proposes can according to node density, dynamically, regulate the length of time frame adaptively, this just means, in the region that node is sparse, can save frame circulation timei, improve radio channel utilization; In the place that node density is larger, timeslot number can be increased again to hold more node thereupon, ensure the competition probability of success of certain level.In practice, when the node of a different frame length is linked into another network, it simply can discharge time slot, as new access point, can change the frame length of oneself according to network.Therefore ATSA agreement is with good expansibility, and can adapt to different networks.
In order to verify that the present invention has less node conflict, we are in one section of simulation time, and compare the interstitial content clashed in several existing agreement and the present invention, result as shown in figure 12.Show in figure based on node motion direction timeslot scheduling strategy VeMAC agreement than random competition time slot ADHOC agreement reduce about 50% time slot collision, and reduce by the conflict of about 50% than VeMAC agreement based on the timeslot scheduling strategy of direction and geographical location information, this greatly reduces the access delay of node from probability, thus improves the performance of real-time MAC protocol preferably.
In order to verify that the present invention has higher channel utilization, we emulate within a period of time, compare VeMAC agreement and channel utilization of the present invention, as shown in figure 13, as can be seen from the figure, the average throughput 35% of VeMAC agreement, and the channel utilization of ATSA agreement is more than 65%, has clearly advantage.
The present invention, according to otherness (direction, geographical position) the distribution T DMA time slot of node, decreases the access interference that node occurs and the probability merging conflict to a great extent; And according to the node density change that node perceived arrives, adjust frame length dynamically, to meet the demand that node accesses channel fast; Prove that the present invention has lower time delay by theory analysis and emulation experiment two aspect, compared with existing protocol, the present invention has less conflicting nodes quantity, higher channel utilization, and is with good expansibility.