The dynamic decision device and the decision-making technique thereof of RTS-CTS handshake mechanism
Technical field
The present invention relates to the cordless communication network technical field, relate in particular to a kind of message transmit mechanism of wireless communication field.
Background technology
For the transmission collision that reduces data and retry send as far as possible, prevent that each website from taking over signal disorderly for use, WLAN has adopted the CSMA/CA similar with Ethernet CSMA/CD (csma/conflict and avoid) agreement.Fig. 1 is the skeleton diagram that adopts DATA-ACK mechanism to communicate.Message will be sent in any one terminal; Must wait for channel idle, when channel idle, wait for the DIFS time, also sentence idle condition as if channel and then send message this moment; Transmission finishes the back waiting for that SIFS receives ACK frame (acknowledgement frame) in the time, then thinks and sends successfully.
But the communication range of each node is restricted in the WLAN, and shared broadcast channel, and the problem of " concealed nodes " and " exposed node " is therefore arranged.Wherein, " concealed nodes " is meant that a terminal is positioned at the communication range of receiving terminal, and outside the communication range that sends the terminal.In Fig. 2, when terminal A and terminal C detect less than wireless signal, think that all terminal B is idle, thereby all send data that the result bumps to terminal B.
For fear of " concealed nodes " problem, standard has also defined the communication means that adopts the RTS-CTS handshake mechanism.Compare traditional DATA-ACK mechanism, the request of having imported of this RTS-CTS handshake mechanism is sent (Request To Send:RTS) frame and is allowed to send (Clear To Send:CTS) frame.That is, this source terminal sent the control frame of a weak point earlier before sending message, be called the RTS frame, and it comprises source address, destination address and communicates by letter specifically (comprising corresponding acknowledgement frame) the required duration.If medium are idle, then a response control frame is just sent at the purpose terminal, is called the CTS frame, and it comprises the duration (from the RTS frame, this duration being copied in the CTS frame) that current signal post needs.Fig. 3 is the figure that the overall process of RTS-CTS-DATA-ACK is shown.
In the ordinary course of things, WLAN adopts DATA-ACK mechanism, because the RTS-CTS handshake mechanism need consume the more time, influences communication efficiency.Therefore but when concealed nodes is arranged, all detect less than the other side like terminal A and C among Fig. 2, cause throughput to descend on the contrary because of conflict if all when terminal B sends data this moment, adopt the RTS-CTS handshake mechanism this moment, and communication efficiency is higher on the contrary.
When does this employing RTS-CTS handshake mechanism communicate? 802.11 stipulate in the standard that using the RTS thresholding of RTS-CTS handshake mechanism is the size of message, but wherein the scope of RTS thresholding value is the 0-2346 byte, default value is 2346 bytes.
But, when determining whether adopting the RTS-CTS handshake mechanism, have two following problems according to message size.At first, this regulation is not considered the factor of speed.802.11b support 4 kinds of modulation rate: 1Mbps, 2Mbps, 5.5Mbps, 11Mbps.802.11a support 8 kinds of modulation rate: 6Mbps, 9Mbps, 12Mbps, 18Mbps, 24Mbps, 36Mbps, 48Mbps, 54Mbps.802.11g support 12 kinds of modulation rates, 4 kinds of modulation rates that promptly above-mentioned 802.11b supports add 8 kinds of modulation rates that 802.11a supports.Identical message size, different speed is sent the deadline difference, and the interference of receiving is different, all adopts identical RTS thresholding unreasonable.Secondly this regulation is static, does not consider the variability of wireless channel.
Summary of the invention
The object of the present invention is to provide a kind of transmitting time with message serves as to adopt the dynamic decision method of RTS-CTS handshake mechanism, when having inherited the advantage of prior art, considers the influence of modulation rate to throughput.
The present invention provides a kind of dynamic decision device of RTS-CTS handshake mechanism in order to solve the problems of the technologies described above.This device comprises big or small mnemon, Rate Adapter Unit, time calculating unit and decision package; Wherein, The message size that size mnemon is used for being sent out is delivered to time calculating unit; Rate Adapter Unit is used for the modulation rate of current channel is delivered to time calculating unit; Time calculating unit is used for calculating and sending the required transmitting time of said message based on the said message size and the modulation rate that receive, and said transmitting time is delivered to decision package; And decision package is used for more said transmitting time and RTS thresholding predefined fiducial time, and judges whether to adopt the RTS-CTS handshake mechanism according to result relatively.
Preferably, time calculating unit calculates transmitting time through following formula:
Transmitting time=T
Lead code+PLCP head+ f [the single sign bit number in message size * 8/] * t
Symbol, wherein, T
Lead code+PLCP headBe the transmitting time of lead code and PLCP head, f [] representes to round up function, t
SymbolIt is the transmission required time of single symbol.
Preferably, in decision package, when transmitting time is less than or equal to fiducial time, use DATA-ACK mechanism to send message; When transmitting time during, use the RTS-CTS handshake mechanism to send message greater than fiducial time.
The present invention also provides a kind of dynamic decision method of RTS-CTS handshake mechanism.This method comprises following several steps: (a) based on the modulation rate of message size that will be sent out and current channel, calculate and send the required transmitting time of said message; (b) predefined fiducial time in more said transmitting time and the RTS thresholding, and judge whether to adopt the RTS-CTS handshake mechanism according to result relatively.
Preferably, in step (a), calculate transmitting time through following formula:
Transmitting time=T
Lead code+PLCP head+ f [the single sign bit number in message size * 8/] * t
Symbol, wherein, T
Lead code+PLCP headBe the transmitting time of lead code and PLCP head, f [] representes to round up function, t
SymbolIt is the transmission required time of single symbol.
Preferably, in step (b), when transmitting time is less than or equal to fiducial time, use DATA-ACK mechanism to send message; When transmitting time during, use the RTS-CTS handshake mechanism to send message greater than fiducial time.
The present invention is the RTS thresholding with the transmitting time of message, has not only considered the influence of message size to throughput, also fully takes into account the influence of modulation rate to throughput, can use the RTS-CTS handshake mechanism neatly.
The present invention has introduced the notion of timeslice, fully takes into account the dynamic of channel, and is stronger to the adaptability of the channel of real-time change.
Description of drawings
Fig. 1 is the skeleton diagram that adopts DATA-ACK mechanism to communicate;
Fig. 2 is the figure of explanation hidden node problem;
Fig. 3 is the figure that the overall process of RTS-CTS-DATA-ACK is shown;
Fig. 4 is the block diagram of the dynamic decision device of RTS-CTS handshake mechanism;
Fig. 5 is the flow chart that the dynamic decision method of RTS-CTS handshake mechanism is shown.
Embodiment
At first, for the ease of understanding technical scheme of the present invention, introduce the proper noun of often using in this area earlier.
DIFS: distributed inter-frame space, (time) that in competitive service, is used for cutting apart former subframe at interval.
SIFS promptly lacks (Short) interFrameGap, is the shortest interFrameGap, is used for separating each frame that belongs to once dialogue.A station should during this period of time switch to receive mode from send mode.
NVA (network allocation vector, Netwo kAllocation Vector): be equivalent to a timer, be used for the medium time of specifying expectation to take.
The present invention takes into full account the continuous variability of wireless channel and the various speed of message, but does not use message size, determines whether adopting the RTS-CTS handshake mechanism and introduce the timeslice notion.That is the RTS thresholding of the present invention transmitting time that is message.
Fig. 4 is the block diagram of the dynamic decision device of RTS-CTS handshake mechanism.Fig. 5 is the flow chart that is used to judge whether use the dynamic decision device of RTS-CTS handshake mechanism.
From Fig. 4, can know, decision system 100 comprise the length that is used to store the message that will be sent out big or small mnemon 101, for the Rate Adapter Unit 102 of channel matched modulating speed, calculate the transmitting time of message time calculating unit 103, be used to determine whether to adopt the decision package 104 of RTS-CTS handshake mechanism.
Fig. 5 is the flow chart that the dynamic decision method of RTS-CTS handshake mechanism is shown.The dynamic decision method of this RTS-CTS handshake mechanism comprises following several steps: (a) based on the modulation rate of message size that will be sent out and current channel, calculate and send the required transmitting time of said message; (b) predefined fiducial time in more said transmitting time and the RTS thresholding, and judge whether to adopt the RTS-CTS handshake mechanism according to result relatively.Below in conjunction with Fig. 4 and Fig. 5 the operation principle of the dynamic decision device of RTS-CTS handshake mechanism once is described.
At first in step S201, big or small mnemon 101 can be extracted the Frame size from the attribute information of TCP message.Wherein, 802.11 frame must be sent in the air through physical layer; Need physical layer convergence process (PLCP) to increase lead code and PLCP head for each frame; And 802.11 frames itself just comprise mac frame, take 28 bytes, and comprise the subnet annex point that length is 8 bytes (Sub Network Point of Attachment:SNPA) header.Therefore encapsulate a Frame, will increase the added burden of 36 bytes.Therefore, the Frame of 1500 bytes then becomes the message of 1536 bytes, if add the encryption header, the length of MAC header then can be longer.Thus, do not considering under the encryption situation that big or small mnemon 101 sends to time calculating unit 103 with the message size that calculates (the Frame size adds the numerical value of 36 bytes).
In step S202, Rate Adapter Unit 102 is delivered to time calculating unit 103 with the modulation rate of current channel then.Because of 802.11 agreements are not stipulated unique message modulation rate, so Rate Adapter Unit 102 need come to be current speed of wireless channel configuration based on packet loss, frame loss rate, detecting data bag or continuous transmission success rate.At present, the frequent typical rate matching algorithm that uses in this area has AARF algorithm, RBAR algorithm, Onoe algorithm, SampleRate algorithm etc.The rate-adaptation algorithms that should be understood that WLAN commonly used all can be applicable to this, repeats no more at this owing to belong to prior art.
This moment, time calculating unit 103 calculated the required transmitting time of the said message of transmission based on message size and modulation rate through following formula 1 in step S203:
Transmitting time=T
Lead code+PLCP head+ f [the single sign bit number in message size * 8/] * t
Symbol(formula 1)
Wherein, T
Lead code+PLCP headBe the transmitting time of lead code and PLCP head, f [] representes to round up function, t
SymbolBe transmission required time of single symbol, i.e. t
Symbol=symbol figure place/modulation rate.
Can know that by above-mentioned formula 1 the present invention takes all factors into consideration the influence for throughput of message size and modulation rate, in the advantage of not abandoning prior art, fully take into account the dynamic of wireless channel.
After time computing unit 103 calculates the required transmitting time of this message, these data are sent to decision package 104.
In step S204, predefined fiducial time among decision package 104 more said transmitting times and the RTS.As comparative result,, transmitting time carries out step S205 when being less than or equal to fiducial time, and promptly use DATA-ACK mechanism (claiming normal mechanism again) to send message; Otherwise, carry out step S206 when transmitting time during greater than fiducial time, promptly use the RTS-CTS handshake mechanism to send message.
The present invention is the RTS thresholding with the transmitting time of message, has not only considered the influence of message size to throughput, also fully takes into account the influence of modulation rate to throughput, can use the RTS-CTS handshake mechanism neatly.
For the ease of understanding, below be that example describes with 802.11a.As stated, 802.11a supports 6Mbps, 9Mbps, 12Mbps, 18Mbps, 24Mbps, 36Mbps, 48Mbps, the data rate of 54Mbps.
Wherein, DIFS=34 μ s, SIFS=16 μ s, lead code and PLCP hair send time=20 μ s.
And under 54Mbps speed, 802.11a uses the symbol of 216 positions, each symbol transmitting time t
SymbolBe symbol figure place/modulation rate=216 bits/(54M bit)=4 μ s.
Suppose the Frame of transmission 1500 bytes, this Frame is 1536 bytes after adding the first-class information of mac frame.The symbolic number that then needs is f [1536 * 8/216]=57.
Therefore, based on formula 1, need 248 μ s (802.11DATA=20+57 * 4) when sending the message of 1536 bytes.
To all speed, calculate required transmitting time based on formula 1, shown in the form 1.
Speed (Mbps) |
Frame size (byte) |
Delivery time (μ s) |
54 |
1500 |
248 |
48 |
1500 |
276.5 |
36 |
1500 |
362 |
24 |
1500 |
533 |
18 |
1500 |
704 |
12 |
1500 |
1046 |
9 |
1500 |
1388 |
6 |
1500 |
2072 |
Table 1
Can know that from table 1 in the 802.11a agreement, when sending the message of identical size, modulation rate is bigger to the weighing factor of transmitting time.Also draw from above analysis, identical message size adopts low modulation speed, and the transmitting time sheet is very long.Receive interference potential very big.
So it is unreasonable to judge whether to carry out RTS/CTS according to message size, judging whether to carry out RTS/CTS through timeslice is more suitably.