A kind of industrial wireless network media access control method
Technical field
The present invention relates to a kind of Industry Control method, particularly relate to a kind of industrial wireless network media access control method of special use.
Background technology
Problem in the data link layer mainly can classify as two large problems, and the one, access problem, the 2nd, scheduling problem.This is the media access control (MAC) method applicable function of wanting emphasis to realize just also.At present, overwhelming majority media access control (MAC) method applicable has only been considered the physical layer characteristics, do not consider high-rise, application layer particularly, and use as one in technical grade Internet of Things typical case---based on wireless industrial network networked control systems, the contact of its application layer and data link layer closely, its communication information major part in application layer to have determined in advance (the periodical communication task in the schedule time list of generation).In addition, radio communication is the communication quality degradation in industrial environment, and this is so that existing media access control (MAC) method applicable can not satisfy the application demand of industry wireless network preferably, and wireless technology is used at the industrial network control field and is obstructed.
Summary of the invention
The object of the present invention is to provide a kind of industrial wireless network media access control method of special use.The method is used superframe mechanism, distribute competition phase and non-competing phase in each superframe according to periodical communication task in the technical grade Internet of Things and aperiodicity communication task, effectively alleviate wireless technology communication quality degradation in industrial environment and use the negative effect that brings to industrial network.
The objective of the invention is to be achieved through the following technical solutions:
A kind of industrial wireless network media access control method, this control method regulation Four types frame: beacon frame, Frame, acknowledgement frame and command frame; The frame that sends in contention access period uses the machine-processed access channel with the CSMA/CA of time slot, and the data one of transmission are the aperiodicity data in the industrial network system, and the 2nd, there is not the successfully periodic data of transmission in the previous non-competing phase (CFP); Unexpectedly strive the phase non-, data transfer does not use CSMA/CA mechanism access channel, equipment all is that the time slot in appointment sends data, the data that send during this period are the periodical communication tasks in the industrial network system, the periodical communication task that namely this corresponding time generates in the high-rise dispatch list that generates; Simultaneously, the running of the method comprises: avoidance mechanism, data re-transmission mechanism, bag after protocol conversation mechanism, access mechanism, interframe force waiting mechanism, supervisory channel busy receive and repeat monitoring mechanism, more than mechanism by there being state machine that they are integrated into a system.
Described a kind of industrial wireless network media access control method, its described protocol conversation mechanism, during CFP, only relate to the mutual participation of two kinds of frames, comprise the Frame from the source to the destination node, the ACK frame that Frame is responded from the purpose to the source node; During CAP, relate to the mutual participation of four kinds of frames, before source node sends data to destination node, the participation that requires to send frame RTS and confirm to send frame CTS.
Described a kind of industrial wireless network media access control method, its described access mechanism relates to access mechanism during CAP, and this mechanism has adopted system to specify the access scheme of the carrier sense collision avoidance protocol (CSMA/CA) of keeping out of the way; All frames are all with the duration value of their busy channels that requires.
Described a kind of industrial wireless network media access control method, its described interframe is forced waiting mechanism, and one of transmission experience between two frames is forced the stand-by period: comprise distributed inter-frame space, the interFrameGap of short interFrameGap and expansion.
Described a kind of industrial wireless network media access control method, the avoidance mechanism after its described supervisory channel is busy, system determines back off time according to the priority of data, the time quantum that must experience as access channel institute again.
Described a kind of industrial wireless network media access control method, its described data re-transmission mechanism, acknowledgement frame takes defeat the triggering retransmission mechanism, and according to the size of Frame number of retransmissions is had different restrictions, the long bag of regulation retry maximum times and short bag retry maximum times.
Described a kind of industrial wireless network media access control method, its described bag receive and repeat monitoring mechanism, and after bag received, relevant information was stored; The bag that repeats to receive will be abandoned by the MAC layer.
Advantage of the present invention and effect are:
The present invention is directed to the scheduling problem of communication task (comprising periodic task and aperiodicity task) in data link layer of industrial network networked control systems, design a kind of industrial wireless network media access control method of special use.The method is used superframe mechanism, distributes competition phase and non-competing phase in each superframe according to periodical communication task in the technical grade Internet of Things and aperiodicity communication task.It has taken into account periodical communication task and the Real-Time Scheduling of aperiodicity communication task in data link layer that assign on the upper strata, can effectively alleviate wireless technology communication quality degradation in industrial environment and use the negative effect that brings to industrial network.
Description of drawings
Fig. 1 is superframe structure figure of the present invention;
Fig. 2 is finite state machine figure of the present invention.
Embodiment
The present invention is described in detail with reference to the accompanying drawings.
Control method of the present invention has been stipulated the Four types frame: beacon frame, Frame, acknowledgement frame and command frame.Beacon frame sends to be responsible for tissue by the communication controler in the wireless industrial control system (coordinator is such as the LAS among the FF) only.Beacon frame has mainly comprised the basic condition of communication controler self, and whether the initial time slot of superframe and other equipment of network have the information such as data in communication controler.The effect of beacon frame mainly is to allow subset obtain the essential information of parent device when subset adds network, wherein mainly comprises network identity, the network address and the MAC Address of parent device.Simultaneously, beacon frame is realized the synchronous of equipment room as the origin identification of superframe.Superframe is different from beacon frame, Frame, acknowledgement frame and command frame, and superframe is a kind of mechanism that the time is managed, and is not the institutional framework of data message, thereby is not a frame on the practical significance, is a kind of temporal concept.In network, utilize superframe that the call duration time of data is carried out strict division.The structure of superframe stipulated by communication controler, for each subnet be take superframe as the cycle organization network in the communication of equipment room, this cycle equals the grand cycle in the high-rise schedule time list that generates.Each superframe sends beacon frame as initial take communication controler, has comprised superframe with time of continuing and to during this period of time information such as distribution in this beacon frame.Behind beacon frame when other equipment receive superframe and begin in the network, just can be according to the task of wherein content arrangement oneself, for example enter resting state until this superframe finishes or waits for receive data, and utilize superframe structure effectively to control the access of wireless channel.The definition of superframe: communication channel is divided into beacon frame sends phase, contention access period (CAP) and three kinds of states of non-competing phase (CFP), as shown in Figure 1.Superframe is divided into several isometric time slots (time slot), and wherein beacon frame accounts for a time slot.After the beacon frame transmission phase finished, channel just entered contention access period (CAP) and (CFP) alternating phases of non-competing phase that provides in advance.The parameters such as timeslot number that the length of time slot, each contention access period (CAP) and each non-competing phase (CFP) comprise are all determined by communication controler, and are broadcast to whole network by beacon frame.And communication controler is the zero-time of periodical communication task in the schedule time list that generates according to high level and how much stipulates the beginning of each non-competing phase (CFP) and the timeslot number that takies, remaining other times all are defined as contention access period (CAP), that is to say that the corresponding periodical communication task of contention access period (CAP) sets aside some time.In contention access period, except acknowledgement frame with immediately following any Frame after the data request command acknowledgement frame, all frames of transmission all use the CSMA/CA mechanism access channel with time slot.The data that send during this period have two classes, the one, the aperiodicity data in the industrial network system, as report to the police, bursty data reads etc., the 2nd, not have the successfully periodic data of transmission in the previous non-competing phase (CFP).If equipment does not have these two classes data to send out within this period, equipment can enter resting state to save energy.Unexpectedly strive the phase non-, data transfer does not use CSMA/CA mechanism access channel, and equipment all is that the time slot in appointment sends data, thereby has avoided the conflict access.The data that send during this period are the periodical communication tasks in the industrial network system, the periodical communication task that namely this corresponding time generates in the high-rise dispatch list that generates.
The concrete operating mechanism of the present invention comprises following:
Protocol conversation mechanism: protocol conversation mechanism only relates to the mutual participation of two kinds of frames during CFP, comprise the Frame from the source to the destination node, the ACK frame that Frame is responded from the purpose to the source node.If source node does not receive the ACK frame, and the time slot of distributing to this equipment do not use then and can retransmit, until receive the ACK frame.If distributing to the time slot of this equipment has used and has not received yet the ACK frame, then this Frame will use CSMA/CA mechanism to continue to retransmit during back to back CAP, until overtime or exceed the number of retransmissions of system regulation, keep out of the way by the back off time of system's regulation if run into conflict, this time is to stipulate according to the priority of these data.During CAP, relate to the mutual participation of four kinds of frames, before source node sends data to destination node, the participation that requires to send frame RTS and confirm to send frame CTS, they are used for the channel reservation bandwidth.Source node sends RTS request channel reservation to destination node first, if success, destination node can respond a CTS frame, and this process can be regarded as shaking hands before the transmission of data.After this could be to the Frame of destination node transmission from source node, if destination node successfully receives, destination node then sends the ACK frame that this Frame is responded to source node.If source node does not receive the ACK frame, then can wait for limitedly retransmitting data frame of suitable back off time and number of times.
Access mechanism: relate to access mechanism during CAP, this mechanism has adopted system to specify the access scheme of the carrier sense collision avoidance protocol (CSMA/CA) of keeping out of the way.Before the transmission beginning, radio node elder generation monitor channel.If it is occupied to listen to channel, then this node can transmission package.If simultaneously transmission package of two or more radio nodes is arranged, then produces conflict, and cause one or more bags impaired.For fear of conflict, occupied if node monitored channel before the beginning transmission package, then automatically enter and keep out of the way the stage.The time quantum that back off algorithm is selected is to be determined according to the priority of these data by system.Stipulate that this node must be waited for and could attempt during this period of time sending bag, the time of giving out a contract for a project simultaneously must be the zero hour of a time slot.Avoid in order further to conflict, this mechanism is introduced the variable of network allocation vector (NAV, Network Allocation Vector).The time that NAV indicates certain radio node to think that channel must be waited for before again open.All with the duration value of their busy channels that requires, radio node can make its NAV remain renewal by checking this value to all frames.If certainly do not receive acknowledgement frame from the point of destination point, then this time transmission writes off, and may cause this node to continue to use above-mentioned mechanism that this frame is retransmitted.Above-mentioned activity is finished in must be during this CAP, if finish to still have Frame successfully to transmit to this CAP, will wait until that then continuing competitive channel during the next CAP transmits, until overtime or exceed the number of retransmissions of system's regulation.
Interframe is forced waiting mechanism: the transmission between two frames must be experienced one forces the stand-by period: comprise distributed (coordination function) interFrameGap (Distributed (coordination function) Interframe space, DIFS), short interFrameGap (Short Interframe space, SIFS) and the expansion interFrameGap (Extended Interframe space, EIFS).
Avoidance mechanism after supervisory channel is busy: system determines back off time according to the priority of data, the time quantum that must experience as access channel institute again.
Data re-transmission mechanism: acknowledgement frame takes defeat the triggering retransmission mechanism, and the size according to Frame has different restrictions to number of retransmissions, regulation long bag retry maximum times (long retry limit) and short bag retry maximum times (short retry limit).
Bag receives and repeats monitoring mechanism: after bag received, relevant information was stored.Any bag that repeats to receive will be abandoned by the MAC layer.
Such as Fig. 2, based on above mechanism by there being state machine that they are integrated into a system.