Based on the wireless lan channel detection method of optimum stopping theory
Technical field
The present invention relates to WLAN and communication technical field, especially a kind of wireless lan channel detection method based on optimum stopping theory.
Background technology
Current wireless access point (AP) in use, substantially be all that channel is set by hand, operationally its setting of Auto-matching of the end products such as wireless network card, all be operated in same channel when work, if so just there will be in community when having multiple wireless aps and terminal all in running order, due to the allocated channel not having the channel management mechanism of Public Authority orderly, probably there is cochannel interference problem, see Fig. 1, greatly can affect the service quality (QoS) of transmission like this, especially throughput performance.Even if wireless aps has automatic channel detecting function in arranging at present, select one to disturb less channel when but most products just configures for the first time, actual use in or fixed channel carries out work, do not make the selection of preferred channels according to around air interference environment.
And at present have following several for the method for channel allocation under many wireless aps coexist:
Method one: all channels of periodic polling find the method for interference minimum channel.The method adopts RTS(Request to Send)/CTS(Clear to Send) successively from No. 1 channel polling to maximum number channel, the signal to noise ratio (snr) information that the physical layer preamble of the control frame that each channel of wireless terminal record receives carries, after having added up the SNR of all channels, carry out the comparison of SNR numerical values recited, the channel at maximum S/N R place is the minimum channel of interference, is then transferred to all terminals of wireless area, place by network allocation vector (NAV) mode.In preferred channels poll-interval, terminal disturbs minimum channel to use as fixed channel this, no longer carries out the searching of preferred channels.The method can solve the co-channel interference of other wireless aps fixed channel simply and effectively, and regularly disturbed condition environmentally can upgrade preferred channels, the handling capacity of system can be provided preferably, but the method has a deficiency, namely each find preferred channels all will all channels of poll successively, searching preferred channels expends time in relatively many, and finding method is efficient not.
Method two: the allocation process method of fast dynamic channel.The method is from radio network controller (RNC) inside, consider from the angle of user's release, the load of each carrier wave in dynamic inquiry community, thus carry out dynamic allocated channel according to the height of carrier load, its implementation procedure is as follows: first, there is radio network controller to inquire about each carrier load, define high-speed downlink packet access users release, determine the first carrier that high-speed downlink packet access users number is minimum and minimum the second carrier wave of high-speed downlink packet access users simultaneously; Then by radio network controller, the high-speed downlink packet access users on first carrier is adjusted on the second carrier wave, thus realize fast DCA.Distribute although this method achieves dynamics of channels, improve the total throughput in community, but only considered load and the access user situation of channel carrier wave, according to load on channel number carry out channel distribution, do not consider the disturbed condition of actual channel, do not alleviate problem of co-channel interference well.
Summary of the invention
The object of this invention is to provide a kind of wireless lan channel detection method based on optimum stopping theory, can fast and effeciently solve shared channel interference problem, improve the handling capacity in wireless system transmission.
To achieve these goals, the invention provides a kind of wireless lan channel detection method based on optimum stopping theory, it is characterized in that comprising the following steps:
The total L of channel in S1, statistics WLAN, and the detection times setting channel is n, initializing n is 1, wherein 0<n≤L and n, L are integer;
S2, when terminal access WAP, this terminal sends RTS control frame to this WAP by any one channel CH in this WLAN, wherein CH be greater than 0 integer;
Whether S3, this WAP detect this channel CH based on optimum stopping theory is preferred channels:
If this channel CH is preferred channels, then stop channel detection, and the sequence number CH of this preferred channels is sent to this terminal;
If this channel CH is not preferred channels, then n++, and this WAP sends CTS control frame to this terminal, whether this terminal judges CH is less than L: if CH<L, and this terminal sends RTS control frame to this WAP by channel CH++ in WLAN, repeated execution of steps S3, continues channel detection; If CH >=L, CH is reset to 1, then this terminal sends RTS control frame to this WAP by channel in WLAN 1, and repeated execution of steps S3, re-starts channel detection.
Whether WAP detects this channel CH based on optimum stopping theory is in step s3 that the process of preferred channels is made up of following steps:
S30, the WAP physical layer preamble to RTS control frame is decoded, and obtains the actual signal to noise ratio snr of this channel CH;
S31, according to formula g=g × p (g>X
n)+E [X
n] × p (g≤X
n)-c
n, ask for actual gain g, wherein E [X when the n-th secondary channel detects
n] channel quality X when representing the n-th secondary channel detection
ndesired value, c
nrepresent the additional overhead of control frame during the n-th secondary channel detection, p (g>X
n) actual gain g> channel quality X when representing the n-th secondary channel detection
nthe probability occurred, p (g≤X
n) represent n-th secondary channel detection time actual gain g≤channel quality X
nthe probability occurred;
A, according to formula
calculate channel quality X when this n-th secondary channel detects
ndesired value E [X
n], x
nirepresent the channel quality under i-th speed in the n-th secondary channel detection, p
nirepresent the probability that in the n-th secondary channel detection, i-th speed occurs, m represents the Theoretical Rate number of levels supported under present channel CH, 1≤n≤L, 1≤i≤m and n, i and m are integer, and L represents the sum of channel in WLAN;
Wherein
l
datarepresent that MAC layer needs to transmit the length of load, R
nirepresent i-th speed R in the n-th secondary channel detection
i, R
baserepresent the basic transfer rate in the n-th secondary channel detection;
P
ni=p
n(SNR
i+1)-p
n(SNR
i), i ∈ [1, m-1], SNR
irepresent and ensure with i-th speed R
iminimum signal to noise ratio during transmission, SNR
i+1represent and ensure with i-th speed R
i+1minimum signal to noise ratio during transmission, p
n(SNR
i) represent SNR in the n-th secondary channel detection
ithe probability occurred, p
n(SNR
i+1) represent SNR in the n-th secondary channel detection
i+1the probability occurred, m represents the Theoretical Rate number of levels that this channel CH supports;
And signal noise ratio SNR (t) and fading channel probability density function ρ (i), two footpath ground return model P
rd the pass of () is
and
d represents the distance between transmitting antenna and reception antenna, P
trepresent the power of transmitting antenna, h
tand h
rthe height of transmitting antenna and reception antenna respectively, L=1, G
tand G
rrepresent the antenna gain of transmit leg and recipient respectively;
B, basis
Ask for the additional overhead c of control frame during the n-th secondary channel detection
n, wherein T
rTSrepresent the transmission time of RTS control frame, T
cTSrepresent the transmission time of CTS control frame, T
cCTSrepresent the transmission time of CCTS control frame, SIFS represents interval between short frame;
S32, judge that whether this actual gain g is at maximum gain G
*limited field in, this maximum gain G
*limited field be
i ∈ [1, m-1], wherein L
datarepresent that MAC layer needs to transmit the length of load, R
baserepresent the basic transfer rate in the n-th secondary channel detection, R
irepresent i-th speed in the n-th secondary channel detection, R
i+1represent the i-th+1 speed in the n-th secondary channel detection, m represents the Theoretical Rate number of levels that present channel CH supports:
If this actual gain g is at this maximum gain G
*limited field in, then by this actual gain g assignment give this maximum gain G
*, i.e. G
*=g;
S33, according to formula
ask for optimal rate R
*, wherein L
datarepresent that MAC layer needs to transmit the length of load, R
baserepresent the basic transfer rate in the n-th secondary channel detection, G
*represent maximum gain;
S34, according to formula
i ∈ [1, m-1], asks for optimal theoretical signal to noise ratio snr
optimal, wherein SNR
irepresent and ensure with i-th speed R
iminimum signal to noise ratio during transmission, SNR
i+1represent and ensure with i-th speed R
i+1minimum signal to noise ratio during transmission, R
irepresent i-th speed in the n-th secondary channel detection, R
i+1represent the i-th+1 speed in the n-th secondary channel detection, m represents the Theoretical Rate number of levels that present channel CH supports;
S35, by the actual signal to noise ratio snr that obtains in step S30 and this optimal theoretical signal to noise ratio snr
optimalcompare:
If SNR>SNR
optimal, then represent that this channel CH is preferred channels, stop channel detection, and the sequence number CH of this channel is sent to counterpart terminal;
If SNR≤SNR
optimalthen n++, and this WAP sends CTS control frame to this terminal, whether this terminal judges CH is less than L: if CH<L, and this terminal sends RTS control frame to this WAP by channel CH++ in WLAN, repeated execution of steps S30 ~ S35, continues channel detection; If CH>=L, CH is reset to 1, this terminal sends RTS control frame to this WAP by channel in WLAN 1, repeated execution of steps S30 ~ S35, continues channel detection.
Channel detection interval is set, in this channel detection interval, whether this WAP detects this channel CH based on optimum stopping theory is preferred channels: if channel CH is preferred channels, then stop channel detection, and adopt this preferred channels to carry out data transmission in this channel detection interval.
Operating personnel, by the configuration interface of WAP, manually can select whether to carry out preferred channels detection, and arrange channel detection interval.
If this channel CH is preferred channels in step s3, then the sequence number CH of this preferred channels and channel detection interval are sent to this terminal with the form of CCTS control frame, wherein this CCTS control frame is the CTS control frame improved, and is followed successively by frame control domain, duration field, receiver address territory, preferred channels sequence number field, channel detection spacer domain and CRC code in this CCTS control frame from left to right.
This preferred channels sequence number field and channel detection spacer domain are respectively 1 byte, wherein preferred channels sequence number high 4 be fixed as 0000 and low 4 according to 8421 coding; Encode according to the B/D binary-to-decimal of 8 bit in channel detection interval.
Other-end monitors this CCTS control frame with the form of network allocation vector, and by this CCTS control frame buffer memory in Buffer Pool.
Each terminal seizes channel according to the Carrier Sense Multiple MAC access way that access/collision is avoided, and reportedly defeated built in the enterprising line number of preferred channels by the RTS/CCTS/DATA/ACK data-set of standard.
In sum, owing to have employed technique scheme, the invention has the beneficial effects as follows:
1, optimum stopping theory is adopted to detect channel in WLAN, the sequence number of this channel is sent to corresponding terminal when to detect this channel be preferred channels, this method is based on the signal to noise ratio of channel, efficiently solve the interference problem between shared channel, improve the handling capacity in wireless transmission, and need not each channel of poll successively, improve the searching efficiency of preferred channels;
2, arrange channel detection interval, compartment of terrain upgrades preferred channels, more efficiently solves the interference problem between shared channel, and just no longer detects once search out preferred channels in channel detection interval;
3, by the configuration interface of WAP, manually can select whether to carry out preferred channels detection, and channel detection interval is set, operate hommization more, more can meet the demand of user;
4, the sequence number of this preferred channels and channel detection interval send to terminal with the form of CCTS control frame, achieve the transmission of preferred channels sequence number;
5, other-end monitors this CCTS control frame with the form of network allocation vector, and by this CCTS control frame buffer memory in Buffer Pool, for each terminal searches preferred channels, need not further increase the searching efficiency of preferred channels;
6, in channel detection interval, each terminal seizes channel according to the Carrier Sense Multiple MAC access way that access/collision is avoided, and reportedly defeated built in the enterprising line number of preferred channels by the RTS/CTS/DATA/ACK data-set of standard, achieve the transmission of terminal data.
Accompanying drawing explanation
Examples of the present invention will be described by way of reference to the accompanying drawings, wherein:
Fig. 1 is the structure chart that multiple WAP coexists;
Fig. 2 is flow chart of the present invention;
Fig. 3 is the frame structure of CCTS control frame;
Fig. 4 is the schematic diagram of RTS/CTS/CCTS/DATA/ACK data transmission mechanism.
Detailed description of the invention
All features disclosed in this description, or the step in disclosed all methods or process, except mutually exclusive feature and/or step, all can combine by any way.
Arbitrary feature disclosed in this description (comprising any accessory claim, summary and accompanying drawing), unless specifically stated otherwise, all can be replaced by other equivalences or the alternative features with similar object.That is, unless specifically stated otherwise, each feature is an example in a series of equivalence or similar characteristics.
As shown in Figure 2, based on the wireless lan channel detection method of optimum stopping theory, should be made up of following steps:
The total L of channel in step one, statistics WLAN, arrange channel detection interval, and the detection times setting channel is n, initializing n is 1, wherein 0<n≤L and n, L are integer;
Step 2, when terminal access WAP (i.e. wireless aps), this terminal by any one channel CH transmission RTS control frame in this WLAN to this WAP, wherein CH be greater than 0 integer;
Step 3, in channel detection interval, whether this WAP detects this channel CH based on optimum stopping theory is preferred channels:
If channel CH is preferred channels, then stop channel detection, and the sequence number CH of this preferred channels is sent to this terminal, this terminal adopts this preferred channels to carry out data transmission in this channel detection interval;
If channel CH is not preferred channels, then n++(and n is from adding 1), and this WAP sends CTS control frame to this terminal, whether this terminal judges CH is less than L: if CH<L, and this terminal adds 1 certainly by channel CH++(and CH in WLAN, the next channel of channel CH) send RTS control frame to this WAP, repeated execution of steps three, continues sounding channel; If CH >=L, CH is reset to 1, then this terminal sends RTS control frame to this WAP by channel in WLAN 1, repeated execution of steps three, again sounding channel.
In actual use, operating personnel, by the configuration interface of WAP, manually can select whether to carry out preferred channels detection, and arrange channel detection interval.In the first embodiment of the present invention, in the configuration management interface of wireless aps, add " preferred channels detection " radio box, this frame just can not carry out craft arrange wireless channel once choose.After choosing " preferred channels detection ", occur 1 sub-option " probe interval setting " option, unit is second, and unit-sized can be modified according to programming, and unit scale is between 1-255; Operating personnel restart wireless aps after configuring channel detection interval, configuration take-effective.Certainly, channel detection interval not only can manual configuration, can also by being programmed to fixed value.
Particularly, whether this WAP detects this channel CH based on optimum stopping theory is that the process of preferred channels is made up of following steps:
The first step, the physical layer preamble of WAP to RTS control frame is decoded, and obtains the actual signal to noise ratio snr of this channel CH.
Second step, according to formula g=E [max{X
n, g}] and-c
n=g × p (g>X
n)+E [X
n] × p (g≤X
n)-c
n, ask for actual gain g, wherein E [X when the n-th secondary channel detects
n] channel quality X when representing the n-th secondary channel detection
ndesired value, c
nrepresent the additional overhead of control frame during the n-th secondary channel detection, p (g>X
n) represent n-th secondary channel detection time actual gain g be greater than channel quality X
nthe probability occurred, p (g≤X
n) represent n-th secondary channel detection time actual gain g≤this channel CH channel quality X
nthe probability occurred.
(1) according to formula
calculate channel quality X when this n-th secondary channel detects
ndesired value E [X
n],
x
nirepresent the channel quality under i-th speed in the n-th secondary channel detection, p
nirepresent the probability that in the n-th secondary channel detection, i-th speed occurs, m represents the Theoretical Rate number of levels supported under present channel CH, 1≤n≤L, 1≤i≤m and n, i and m are integer, and L represents the sum of channel in WLAN;
Wherein
l
datarepresent that MAC layer needs to transmit the length of load, R
nirepresent i-th speed R in the n-th secondary channel detection
i, R
baserepresent the basic transfer rate in the n-th secondary channel detection;
P
ni=p
n(SNR
i+1)-p
n(SNR
i), i ∈ [1, m-1], SNR
irepresent and ensure with i-th speed R
iminimum signal to noise ratio during transmission, SNR
i+1represent and ensure with i-th speed R
i+1minimum signal to noise ratio during transmission, p
n() for representing probability, p
n(SNR
i) represent SNR in the n-th secondary channel detection
ithe probability occurred, p
n(SNR
i+1) represent SNR in the n-th secondary channel detection
i+1the probability occurred, m represents the Theoretical Rate number of levels that present channel CH supports;
Due to signal noise ratio SNR (t) and fading channel probability density function ρ (i), two footpath ground return model P
rd the pass of () is
and
d represents the distance between transmitting antenna and reception antenna, P
trepresent the power of transmitting antenna, h
tand h
rthe height of transmitting antenna and reception antenna respectively, L=1, G
tand G
rrepresent the antenna gain of transmit leg and recipient respectively, therefore p
n(SNR
i)=p
n(ρ (i) × P
r(d) × δ
-2), and p
n(SNR
i+1)=p
n(ρ (i+1) × P
r(d) × δ
-2);
(2) according to formula
Ask for the additional overhead of control frame during the detection of this n-th secondary channel, comprise the time interval between CTS, RTS and CCTS control frame, wherein T
rTSrepresent the transmission time of RTS control frame, T
cTSrepresent the transmission time of CTS control frame, T
cCTSrepresent the transmission time of CCTS control frame, SIFS represents interval between short frame.
3rd step, judges that whether this actual gain g is at maximum gain G
*limited field in, this maximum gain G
*limited field be
Wherein L
datarepresent that MAC layer needs to transmit the length of load, R
baserepresent the basic transfer rate in the n-th secondary channel detection, R
irepresent i-th speed in the n-th secondary channel detection, R
i+1represent the i-th+1 speed, m represents the Theoretical Rate number of levels that present channel CH supports:
If this actual gain g is at this maximum gain G
*limited field in, then by this actual gain g assignment give this maximum gain G
*, i.e. G
*=g.
4th step, according to formula
ask for optimal rate R
*, wherein L
datarepresent that MAC layer needs to transmit the length of load, R
baserepresent the basic transfer rate in the n-th secondary channel detection, G
*represent maximum gain.
5th step, according to formula
i ∈ [1, m-1], asks for optimal theoretical signal to noise ratio snr
optimal, wherein SNR
irepresent and ensure with i-th speed R
iminimum signal to noise ratio during transmission, SNR
i+1represent and ensure with i-th speed R
i+1minimum signal to noise ratio during transmission, R
irepresent i-th speed in the n-th secondary channel detection, R
i+1represent the i-th+1 speed in the n-th secondary channel detection, m represents the Theoretical Rate number of levels that present channel CH supports.
6th step, by the actual signal to noise ratio snr that obtains in the first step and this optimal theoretical signal to noise ratio snr
optimalcompare:
If SNR>SNR
optimal, then represent that this channel CH is preferred channels, stop channel detection, and the sequence number CH of this channel is sent to counterpart terminal;
If SNR≤SNR
optimalthen n++, and this WAP sends CTS control frame to this terminal, whether this terminal judges CH is less than L: if CH<L, and this terminal sends RTS control frame to this WAP by channel CH++ in WLAN, repeat the first step to the 5th step, continue channel detection; If CH>=L, CH is reset to 1, this terminal sends RTS control frame to this WAP by channel in WLAN 1, repeats the first step to the 5th step, continues channel detection.
CCTS control frame is the CTS control frame of improvement and carries load, and its effect is sequence number and the channel detection interval of transmitting preferred channels.The frame structure of this CCTS control frame as shown in Figure 3, comprises 2 parts: MAC head and load, and MAC head is made up of frame control domain (2 byte), duration field (2 byte) and receiver address territory (6 byte) successively; Loading section is made up of preferred channels sequence number field (1 byte) and channel detection spacer domain (1 byte) successively.Preferred channels sequence number field is filled according to the coding rule of following table, and wherein high 4 are fixed as 0000, and low 4 are carried out according to 8421 codings, and reserved 2 channel designators (14 and 15), if whole byte is all 0, represent error message; Channel detection spacer domain completely according to the B/D binary-to-decimal of 8 bits encode (corresponding be 0-255 without symbol decimal number) carry out, natural number minimum after coding represents 1 second (also can modify according to program).
In addition, other-end monitors this CCTS control frame with the form of network allocation vector NVA, and by this CCTS control frame buffer memory in Buffer Pool, for each terminal searches preferred channels, need not further increase the searching efficiency of preferred channels.Within channel detection interval time, all terminals avoid the MAC access way of (CSMA/CA) to seize channel according to Carrier Sense Multiple access/collision, and reportedly defeated built in fixed channel (before the preferred channels of buffer memory) enterprising line number by the RTS/CTS/DATA/ACK data-set of standard, as shown in Figure 4.
When there being multiple wireless aps coexisting communication in wireless area, can by third party's wireless network observations software observation actual wireless channel usage.Adopt cognitive channel to carry out the wireless product communicated, effectively can avoid intrinsic manual configuration channel, select the less channel of interference relatively to communicate.
This method realizes on the source code of the wireless aps of increasing income and wireless network card, by the present invention propose RTS/CTS/CCTS/DATA/ACK MAC data transmission mechanism and add the MAC handling process inside corresponding driver to based on the preferred channels Processing Algorithm of optimum stopping theory, compiling, link drive and test by afterwards, download to corresponding device with the form of firmware updating.
During upgrading, the wireless terminal of firmware updating is associated with wireless aps by certification, and the cognitive channel function then set by wireless aps carries out channel negotiation and reportedly defeated in the enterprising line number of preferred channels.
The present invention is not limited to aforesaid detailed description of the invention.The present invention expands to any new feature of disclosing in this manual or any combination newly, and the step of the arbitrary new method disclosed or process or any combination newly.