CN100556044C - Protocol control method towards wireless industrial control network - Google Patents

Protocol control method towards wireless industrial control network Download PDF

Info

Publication number
CN100556044C
CN100556044C CNB2006101191389A CN200610119138A CN100556044C CN 100556044 C CN100556044 C CN 100556044C CN B2006101191389 A CNB2006101191389 A CN B2006101191389A CN 200610119138 A CN200610119138 A CN 200610119138A CN 100556044 C CN100556044 C CN 100556044C
Authority
CN
China
Prior art keywords
token
successor
frame
station
main website
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2006101191389A
Other languages
Chinese (zh)
Other versions
CN1964353A (en
Inventor
侯维岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHANGHAI UNIVERSITY
Original Assignee
SHANGHAI UNIVERSITY
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI UNIVERSITY filed Critical SHANGHAI UNIVERSITY
Priority to CNB2006101191389A priority Critical patent/CN100556044C/en
Publication of CN1964353A publication Critical patent/CN1964353A/en
Application granted granted Critical
Publication of CN100556044C publication Critical patent/CN100556044C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

本发明涉及一种面向无线工业控制网的协议控制方法。其通讯模型由物理层、数据链路层和应用层组成,所述的物理层和应用层分别采用国际标准网络互连模型OSI的物理层和应用层,其特征在于所述的数据链路层分成二层:下面子层使用传统的载波监听多址接入CSMA协议作为无线信道接入控制协议;上面子层使用一种基于令牌的控制协议,在全互连的无线分布系统中建立一个令牌逻辑环,从而控制下面子层的CSMA协议;设置一个令牌逻辑环自愈机制,避免因令牌的丢失使得令牌逻辑环失效;并确定一个令牌逻辑环扩展和收缩机制,使系统能自动适应各移动站点的加入和退出变化。本发明能避免通讯传输中的碰撞,满足针对工业对象的实时控制要求。

Figure 200610119138

The invention relates to a protocol control method oriented to a wireless industrial control network. Its communication model is made up of physical layer, data link layer and application layer, and described physical layer and application layer adopt the physical layer and application layer of international standard network interconnection model OSI respectively, it is characterized in that described data link layer It is divided into two layers: the lower sublayer uses the traditional carrier sense multiple access CSMA protocol as the wireless channel access control protocol; the upper sublayer uses a token-based control protocol to establish a Token logical ring, thereby controlling the CSMA protocol of the lower sublayer; setting a token logical ring self-healing mechanism to avoid token logical ring failure due to token loss; and determining a token logical ring expansion and contraction mechanism, so that The system can automatically adapt to the joining and exiting changes of each mobile station. The invention can avoid the collision in communication transmission and meet the real-time control requirement for industrial objects.

Figure 200610119138

Description

面向无线工业控制网的协议控制方法 Protocol control method for wireless industrial control network

技术领域 technical field

本发明涉及一种网络协议栈,特别是一种面向无线工业控制网的协议栈。The invention relates to a network protocol stack, in particular to a protocol stack oriented to a wireless industrial control network.

背景技术 Background technique

工业现场控制中的移动或旋转对象上的传感器、手持数据采集设备、需临时安装的设备等,电缆的使用是较难甚至无法实现的。同时在极其冷热、危险、潮湿的环境中使用有线的物理介质连接也将降低通讯系统的可靠性。随着无线通信技术的发展和日趋成熟,将无线通信技术应用于工业控制网络,构成无线工业控制网络WICN(Wireless Industrial Control Network)成为可能。It is difficult or even impossible to use cables for sensors on moving or rotating objects in industrial field control, handheld data acquisition equipment, and equipment that needs to be temporarily installed. At the same time, the use of wired physical media connections in extremely cold, hot, dangerous, and humid environments will also reduce the reliability of the communication system. With the development and maturity of wireless communication technology, it is possible to apply wireless communication technology to industrial control network to form a wireless industrial control network WICN (Wireless Industrial Control Network).

其相关研究中的一个重要问题就是数据链路层协议的研究,其数据链路层的协议问题对WICN网络的实时性能和可靠性能影响很大。如何设计一个合适的适用于工业现场控制用的无线工业控制网络的数据链路层协议是目前国际上的一个重要的研究方向。An important issue in its related research is the study of the data link layer protocol. The protocol problem of the data link layer has a great impact on the real-time performance and reliability of the WICN network. How to design a suitable data link layer protocol suitable for industrial field control wireless industrial control network is an important research direction in the world at present.

无线局域网络的实时性主要取决于数据链路层的媒体介入控制,该问题的研究已有一段时间,但是其目前基本上仍限于使用传统的CSMA(载波监听多址接入)法。这种基于争用的方法是一种常用的决定对媒体访问权的协议。尽管人们用了各种改进措施,如增加CA(碰撞避免)功能等,还是不能从根本上避免传输中的通信碰撞,不能保证工业控制系统中对响应时间确定性的要求。The real-time performance of WLAN mainly depends on the media access control at the data link layer. This problem has been studied for some time, but it is still basically limited to the traditional CSMA (Carrier Sense Multiple Access) method. This contention-based approach is a commonly used protocol for determining access to media. Although people have used various improvement measures, such as adding CA (collision avoidance) function, etc., they still cannot fundamentally avoid communication collisions during transmission, and cannot guarantee the deterministic requirements of response time in industrial control systems.

几种一般无线局域网使用的协议存在不同的缺点。例如:1、MACA(MultipleAccess with Collision Avoidance)是早前为无线局域网设计的一个协议。它的基本思想是,发送方刺激一下接收方,让它输出一个短帧,因此,接收方附近的站可以检测到该帧,从而在接下去的数据帧传输过程中它们不再发送数据了。由于采用了RTS-CTS握手机制,MACA减少了数据包的冲突。但是,在MACA中依然存在冲突,且在冲突后采用BEB退避机制,故信道接入的公平性很差,实时性得不到保证。2、MACAW(MACA for Wireless)协议在MACA的基础上做了改进,它增加了载波检测,另外它除了使用RTS/CTS握手信号外,还使用了其它的控制信号(DS,ACK,RRTS),进一步提高了网络的吞吐量。MACAW还采用了MILD退避算法代替了BEB退避机制,改善了信道接入的公平性。但其过多的握手信号增大了它的网络开销和传输时延。MACA-P是为了适应多跳ad-hoc网的需求,而在MACA基础上的一种改进,增强了基于802.11的RTS/CTS功能,可以允许同时的收发,但其并不合适WICN网。3、IEEE802.11协议支持两种操作模式。一种模式称为DCF(Distributed CoordinationFunction),另一种模式称为PCF(Point Coordination Function)。其中DCF模式是节点共享无线信道的基本接入模式,它把CSMA/CA(CSMA with Collision Avoidance)技术和确认(ACK)技术结合起来,并使用了虚拟信道监听机制和帧分片技术,从而提高了整个网络的吞吐量。但802.11协议仍采用BEB退避机制,所以无法保证无线信道接入的公平性。目前还没有一个合适的专门面向工业无线控制网络的协议。Several protocols commonly used in WLANs have different disadvantages. For example: 1. MACA (Multiple Access with Collision Avoidance) is a protocol designed for wireless LAN earlier. Its basic idea is that the sender stimulates the receiver to output a short frame, so stations near the receiver can detect this frame, so that they will not send data during the next data frame transmission. Due to the adoption of the RTS-CTS handshake mechanism, MACA reduces the collision of data packets. However, there are still conflicts in MACA, and the BEB backoff mechanism is adopted after the conflicts, so the fairness of channel access is very poor, and the real-time performance cannot be guaranteed. 2. The MACAW (MACA for Wireless) protocol has been improved on the basis of MACA. It adds carrier detection. In addition to the RTS/CTS handshake signal, it also uses other control signals (DS, ACK, RRTS). Further improve the throughput of the network. MACAW also uses the MILD backoff algorithm to replace the BEB backoff mechanism, which improves the fairness of channel access. But its excessive handshake signals increase its network overhead and transmission delay. MACA-P is an improvement based on MACA to meet the needs of multi-hop ad-hoc networks. It enhances the RTS/CTS function based on 802.11 and allows simultaneous sending and receiving, but it is not suitable for WICN networks. 3. The IEEE802.11 protocol supports two operating modes. One mode is called DCF (Distributed Coordination Function), and the other mode is called PCF (Point Coordination Function). Among them, DCF mode is the basic access mode for nodes to share wireless channels. It combines CSMA/CA (CSMA with Collision Avoidance) technology and acknowledgment (ACK) technology, and uses virtual channel monitoring mechanism and frame fragmentation technology to improve throughput of the entire network. However, the 802.11 protocol still adopts the BEB backoff mechanism, so the fairness of wireless channel access cannot be guaranteed. At present, there is no suitable protocol specifically for industrial wireless control networks.

发明内容 Contents of the invention

本发明的目的在于提供一种面向无线工业控制网的协议控制方法,能避免通讯传输中的碰撞,满足针对工业对象的实时控制要求。The purpose of the present invention is to provide a protocol control method oriented to a wireless industrial control network, which can avoid collisions in communication transmission and meet the real-time control requirements for industrial objects.

为了达到上述目的,本发明采用下述技术方方案:In order to achieve the above object, the present invention adopts following technical scheme:

一种面向无线工业控制网的协议控制方法,其通讯模型由物理层、数据链路层和应用层组成,所述的物理层和应用层分别采用国际标准通讯模型OSI的物理层和应用层,其特征在于所述的数据链路层分成二层:下面子层使用传统的载波监听多址接入CSMA协议作为无线信道的实际接入控制协议;上面子层使用一种基于令牌的控制协议,在全互连的无线分布系统中建立一个令牌逻辑环,从而控制下面子层的CSMA协议;设置一个令牌逻辑环自愈机制,避免因令牌的丢失使得令牌逻辑环失效;并确定一个令牌逻辑环扩展和收缩机制,使网络系统能自动适应各移动站点的加入和退出变化。A kind of protocol control method for wireless industrial control network, its communication model is made up of physical layer, data link layer and application layer, described physical layer and application layer respectively adopt the physical layer and application layer of international standard communication model OSI, It is characterized in that the data link layer is divided into two layers: the lower sublayer uses the traditional carrier sense multiple access CSMA protocol as the actual access control protocol of the wireless channel; the upper sublayer uses a token-based control protocol , establish a token logical ring in the fully interconnected wireless distribution system, thereby controlling the CSMA protocol of the lower sublayer; set a token logical ring self-healing mechanism, to avoid the token logical ring from being invalid due to the loss of the token; and Determine a token logic ring expansion and contraction mechanism, so that the network system can automatically adapt to the changes of the joining and exiting of each mobile station.

上述的使用基于令牌的控制协议,在全互连的无线分布系统中建立令牌逻辑的步骤如下:The steps for establishing token logic in the fully interconnected wireless distribution system using the above-mentioned token-based control protocol are as follows:

(1)初始时,各站点STA首先进入复位状态,然后侦听信道,等待主站的邀请加入;(1) Initially, each station STA first enters the reset state, then listens to the channel, and waits for the invitation from the master station to join;

(2)主站得电后先复位,然后生成一个令牌Token;(2) After the main station is powered on, reset first, and then generate a token Token;

(3)令牌Token沿着逻辑环依次传递,直到等待发送数据帧的站点是STA接收到它,然后它发送读求帧Solicit_successor,邀请其它的从站加入;(3) The token Token is passed sequentially along the logical ring until the station waiting to send the data frame is STA to receive it, and then it sends the read frame Solicit_successor to invite other slave stations to join;

(4)其它从站侦听到Solicit_Successor后,退避一个随机时隙后发送后继站设置帧Set_successor,竞争成功的站点成为主站的后继站;(4) After other slave stations detect Solicit_Successor, they back off for a random time slot and then send the successor station setting frame Set_successor, and the station with successful competition becomes the successor station of the master station;

(5)后继站再把主站先前的后续站设置为它的后继站,对第一个加入的从站来说,主站先前的后继站就是主站本身,由此构成一个初始的含2个站点的令牌逻辑环;(5) The successor station sets the previous successor station of the master station as its successor station. For the first joined slave station, the previous successor station of the master station is the master station itself, thus forming an initial station containing 2 token logical ring of sites;

(6)若任务队列为空或数据帧传送处理完毕后,令牌持有时间THT还未耗尽,主站就再发送Solicit_successor,邀请其他的从站加入;(6) If the task queue is empty or the data frame is transmitted and processed, and the token holding time THT has not been exhausted, the master station will send Solicit_successor again to invite other slave stations to join;

(7)依据步骤(1)~(6)机制,经历一段时间后,无线分布式系统中的各个站点就会自动组建成一个令牌逻辑环,从而形成一个网络系统。(7) According to the mechanism of steps (1)-(6), after a period of time, each station in the wireless distributed system will automatically form a token logical ring, thereby forming a network system.

上述的令牌逻辑环自愈机制的自愈步骤如下:The self-healing steps of the above token logical ring self-healing mechanism are as follows:

(1)主站在建立令牌逻辑环后,生成一个令牌在环上传递,然后主站侦听从站发出的每一个令牌;(1) After the master station establishes a token logic ring, a token is generated and passed on the ring, and then the master station listens to each token sent by the slave station;

(2)在主站中设定一个令牌恢复和最大等待时间TRMWT,当主站帧听到一个令牌,就将TRMWT复位;(2) Set a token recovery and maximum waiting time TRMWT in the master station, when the master station frame hears a token, it will reset TRMWT;

(3)当主站的TRMWT耗尽后还未侦听到下一个令牌,它就认为令牌丢失,然后根据事先存储的连接表信息生成一个新的令牌且发送到丢失令牌的站点。(3) When the TRMWT of the master station is exhausted and has not detected the next token, it considers that the token is lost, and then generates a new token according to the connection table information stored in advance and sends it to the station that lost the token .

上述的令牌逻辑环扩展和收缩机制,确定从站STA的加入和退出过程如下:The above token logical ring expansion and contraction mechanism determines the joining and exiting process of the slave station STA as follows:

(1)从站的加入过程:(1) The joining process of the slave station:

①由主站控制,主站在队列为空时发送Solicit_Successor;① Controlled by the master station, the master station sends Solicit_Successor when the queue is empty;

②欲加入系统的从站在收到Solicit_Successor后将主站设为其前驱站,将主站的后继站设为它的继站,并向主站发送Set_Sucessor;②The slave station that wants to join the system sets the master station as its predecessor station after receiving the Solicit_Successor, sets the successor station of the master station as its successor station, and sends Set_Sucessor to the master station;

③主站收到Set_sucessor后,将该从站设为它的后继站,并向其先前的后继站发送前驱站设置帧为Set_Predecessor;③ After the master station receives the Set_sucessor, it sets the slave station as its successor station, and sends the predecessor station setting frame as Set_Predecessor to its previous successor station;

④主站先前的后继站收到Set_Predecessor后将该从站设为其前驱站,并向主站发送确认帧Ack;④ After receiving Set_Predecessor, the former successor station of the master station sets the slave station as its predecessor station, and sends an acknowledgment frame Ack to the master station;

⑤主站在收到Ack帧后就将令牌传递给此新加入的从站,至此从站的加入过程完成。⑤ After the master station receives the Ack frame, it will pass the token to the newly added slave station, so far the joining process of the slave station is completed.

(2)从站的退出过程:(2) The exit process of the slave station:

①想退出的从站在收到令牌后向其前驱站发送Set_Successor;① The slave station that wants to exit sends Set_Successor to its predecessor station after receiving the token;

②其前驱站收到Set_Successor后将该从站的后继站设为它的后继站,并向该从站的后继站发送Set_Successor;② After the predecessor station receives Set_Successor, set the successor station of the slave station as its successor station, and send Set_Successor to the successor station of the slave station;

③该从站的后继站收到Set_Successor后向该从站回送Ack帧;③The successor station of the slave station returns the Ack frame to the slave station after receiving Set_Successor;

④从站收到Ack帧后将令牌传给其后继站并退出。④After receiving the Ack frame, the slave station passes the token to its successor station and exits.

上述的令牌帧、请求帧、后继站设置帧、前驱站设置帧、Ack帧和数据帧的格式如下:The formats of the above-mentioned token frame, request frame, successor station setting frame, predecessor station setting frame, Ack frame and data frame are as follows:

(1)令牌帧Token的格式:依次含有帧类型FC、逻辑号Seq、建表信息SucA、本站地址LA、前驱站地址PreA和令牌循环数TRC;(1) The format of token frame Token: sequentially contains frame type FC, logic number Seq, table creation information SucA, local station address LA, predecessor station address PreA and token cycle number TRC;

(2)请求帧Set_Successor的格式:依次含有帧类型FC、广播Br、主站后继站地址HSuoA和主站地址HA;(2) The format of the request frame Set_Successor: contains frame type FC, broadcast Br, master station successor address HSuoA and master station address HA in sequence;

(3)后继站设置帧Set_Successor的格式:依次含有帧类型FC、目的地址DA、后继站地址SucA和本帧源地址;(3) The successor station sets the format of the frame Set_Successor: sequentially contains frame type FC, destination address DA, successor station address SucA and the source address of the frame;

(4)前驱站设置帧Set-Predecessor的格式:依次含有帧类型FC、目的地址DA、本帧源地址SA、前驱站地址PreA和Ack帧回道目的地址;(4) The format of the frame Set-Predecessor set by the predecessor station: contains frame type FC, destination address DA, source address SA of this frame, predecessor station address PreA and Ack frame return destination address in turn;

(5)Ack帧的格式:依次含有帧类型FC、目的地址DA和本帧源地址SA;(5) The format of the Ack frame: sequentially contains the frame type FC, the destination address DA and the source address SA of the frame;

(6)数据帧的格式:依次含有帧类型FC、本数据帧传送的预计时限Duration、目的地址DA、本帧源地址SA、数据的优先级别PC、数据Data和循环冗余校验码CRC。(6) The format of the data frame: sequentially contains the frame type FC, the expected time limit Duration of the transmission of the data frame, the destination address DA, the source address SA of the frame, the priority level PC of the data, the data Data and the cyclic redundancy check code CRC.

本发明与现有技术相比较,具有如下显而易见的突出实质性特点和显著优点:本发明提供的协议栈中的数据链路层增设了上面子层,使用一种基于令牌的控制协议控制下面子层的CSMA协议,使信道的传输不发生碰撞,满足针对工业对象的实时控制要求;设置了一个令牌逻辑环自愈机制,避免因令牌丢失使得令牌逻辑环失效,工作可靠;并确定一个令牌逻辑环扩展和收缩机制,使系统能自动适应各移动站点的加入和退出变化,提高系统使用灵活性。Compared with the prior art, the present invention has the following obvious outstanding substantive features and significant advantages: the data link layer in the protocol stack provided by the present invention has added an upper sublayer, and uses a token-based control protocol to control the lower layer The sub-layer CSMA protocol prevents channel transmission from colliding and meets the real-time control requirements for industrial objects; a token logic ring self-healing mechanism is set to avoid token logic ring failure due to token loss, and the work is reliable; and Determine a token logical ring expansion and contraction mechanism, so that the system can automatically adapt to the changes of the joining and exiting of each mobile station, and improve the flexibility of the system.

附图说明 Description of drawings

图1是本发明的通讯模型的结构示意图。Fig. 1 is a schematic structural diagram of the communication model of the present invention.

图2是令牌帧的格式示意图。Fig. 2 is a schematic diagram of the format of the token frame.

图3是Solicit_Successor帧的格式示意图。Fig. 3 is a schematic diagram of the format of the Solicit_Successor frame.

图4是Set_Successor帧的格式示意图。Fig. 4 is a schematic diagram of the format of the Set_Successor frame.

图5是Set_Predecessor帧的格式示意图。Fig. 5 is a schematic diagram of the format of the Set_Predecessor frame.

图6是Ack帧的格式示意图。Fig. 6 is a schematic diagram of the format of the Ack frame.

图7是数据帧的格式示意图。Fig. 7 is a schematic diagram of the format of the data frame.

图8是从站点的加入示意图。Fig. 8 is a schematic diagram of joining from a station.

图9是从站点的退出示意图。Fig. 9 is a schematic diagram of exit from a station.

具体实施方式 Detailed ways

本发明的一个优选实施例结合附图详述如下:A preferred embodiment of the present invention is described in detail as follows in conjunction with accompanying drawing:

参见图1,本面向无线工业控制网的协议协议控制方法是:为满足实时性要求和降低成本,其通信模型在OSI(开放互连模型)的基础上进行了简化。它仅采用了OSI模型中的3层,即物理层、数据链路层和应用层。Referring to Fig. 1, the protocol protocol control method for the wireless industrial control network is: in order to meet real-time requirements and reduce costs, its communication model is simplified on the basis of OSI (Open Interconnection Model). It only uses 3 layers in the OSI model, namely physical layer, data link layer and application layer.

本协议栈中的数据链路层分成2层。数据链路层的下面子层仍然使用CSMA做为实际的无线信道接入控制协议。数据链路层的上面子层使用一种基于令牌的控制机制来控制下层的CSMA。其基本操作过程如下:①在全互连的无线分布式系统中建立一个令牌逻辑环,系统中所有以接收/发送模式工作的STA(站点)都要加入该逻辑环,STA得到令牌后,从而控制下层的CSMA协议独占无线信道来具体实现发送数据帧,以此避免了CSMA协议中的各点无序竞争引发的碰撞。②为了避免因令牌的丢失使得令牌逻辑环失效,系统中设置了自愈机制,保证在一定时间内恢复令牌逻辑环。③还定义了此令牌环的扩展和收缩机制,使系统能够自动适应各移动站点的加入和退出变化。The data link layer in this protocol stack is divided into two layers. The lower sublayer of the data link layer still uses CSMA as the actual wireless channel access control protocol. The upper sublayer of the data link layer uses a token-based control mechanism to control the CSMA of the lower layer. The basic operation process is as follows: ① Establish a token logical ring in the fully interconnected wireless distributed system. All STAs (stations) working in receiving/transmitting mode in the system must join the logical ring. After the STA gets the token, , so as to control the CSMA protocol at the lower layer to monopolize the wireless channel to specifically realize the sending of data frames, thereby avoiding the collision caused by the disorderly competition of various points in the CSMA protocol. ②In order to avoid the failure of the token logic ring due to the loss of the token, a self-healing mechanism is set in the system to ensure that the token logic ring is restored within a certain period of time. ③ It also defines the expansion and contraction mechanism of this token ring, so that the system can automatically adapt to the changes of joining and exiting each mobile station.

本发明的意义在于针对WICN网络的要求,设计出了一个能够兼容和利用目前应用广泛的CSMA协议,又避免了其缺陷的数据链路层协议,可以广泛地在如ZigBee,WLAN等网络的应用中使用。The significance of the present invention is to design a data link layer protocol that is compatible with and utilizes the widely used CSMA protocol and avoids its defects for the requirements of the WICN network, and can be widely used in networks such as ZigBee and WLAN. used in .

下面详细解释本面向无线工业控制网的协议栈的数据链路层中使用的令牌控制机制的建立和实施过程。The establishment and implementation process of the token control mechanism used in the data link layer of the wireless industrial control network-oriented protocol stack will be explained in detail below.

1、令牌环的建立过程1. Token Ring establishment process

(1)初始时,各个从站都未加入逻辑环,各站点首先进入复位状态,然后侦听信道等待主站(与有线网络相连)的邀请加入。(2)主站得电后也先复位,然后主站生成一个令牌Token。(3)令牌沿着逻辑环依次传递,直到等待发送数据帧的站点STA接收到它。然后它发送请求帧Solicit_Successor,邀请其他的从站加入。(4)其它从站侦听到Solicit_Successor后,退避一随机时隙发送后继站设置帧Set_Successor,竞争成功的站点成为主站的后继站。(5)后继站再把主站先前的后继站设置为它的后继站。对第一个加入的从站来说,主站先前的后继站就是主站本身。由此构成了一个初始的2个站点的逻辑环。(6)当令牌沿着令牌逻辑环回到主站,主站先处理队列中的数据传送任务(其数据帧见图7)。若队列为空或数据帧处理完毕后令牌持有时间THT还未耗尽,主站就再次发送Solicit_Successor,邀请其他的从站加入。(7)依据步骤(1)~(6)机制,经历一段充足时间后,无线分布式系统中的站点就会自动组建成一个令牌逻辑环,从而形成一个系统。(1) Initially, each slave station does not join the logical ring, and each station first enters the reset state, then listens to the channel and waits for the invitation from the master station (connected to the wired network) to join. (2) After the master station is powered on, it is also reset first, and then the master station generates a token Token. (3) The token is passed sequentially along the logical ring until the station STA waiting to send the data frame receives it. Then it sends the request frame Solicit_Successor, inviting other slave stations to join. (4) After the other slave stations detect Solicit_Successor, they back off for a random time slot and send the successor station setting frame Set_Successor, and the station with successful competition becomes the successor station of the master station. (5) The successor station sets the previous successor station of the master station as its successor station. For the first slave to join, the previous successor of the master is the master itself. Thus, an initial logical ring of two sites is formed. (6) When the token loops back to the master station along the token logic, the master station first processes the data transmission task in the queue (see Figure 7 for its data frame). If the queue is empty or the token holding time THT has not been exhausted after the data frame is processed, the master station will send Solicit_Successor again to invite other slave stations to join. (7) According to the mechanism of steps (1)-(6), after a sufficient period of time, the stations in the wireless distributed system will automatically form a token logical ring, thus forming a system.

2、系统自愈机制2. System self-healing mechanism

(1)主站在建立令牌逻辑环后,生成一个令牌在环上传递,然后主站侦听从站发出的每一个令牌。(2)在主站中设定一个令牌恢复的最大等待时间TRMWT(TokenResume Max Wait Time),每当主站侦听到一个令牌就将TRMWT复位。(3)当主站的TRMWT耗尽后还未侦听到下一个令牌,它就认为令牌丢失,然后根据事先存储的连接表生成一个新的令牌且发送到丢失令牌的站点。(1) After the master station establishes a token logical ring, it generates a token and passes it on the ring, and then the master station listens to each token sent by the slave station. (2) Set a maximum waiting time TRMWT (TokenResume Max Wait Time) for token recovery in the master station, and reset TRMWT whenever the master station detects a token. (3) When the TRMWT of the master station is exhausted and has not detected the next token, it thinks that the token is lost, and then generates a new token according to the connection table stored in advance and sends it to the site that lost the token.

为了保证响应的实时性,在无线工业控制网中的每一个站点都设有一个固定的最大令牌持有时间MTHT(Max Token Hold Time)。当站点的MTHT耗尽时,即把令牌传给下一个STA。如此周而复始。In order to ensure the real-time response, each station in the wireless industrial control network has a fixed maximum token holding time MTHT (Max Token Hold Time). When the MTHT of the station is exhausted, the token is passed to the next STA. So again and again.

为了在发生令牌丢失现象后,能够自动在一定时间内恢复正常,以保证该协议的正常运转,需要合理的设定令牌恢复的最大等待时间TRMWT。In order to automatically return to normal within a certain period of time after token loss occurs, to ensure the normal operation of the protocol, it is necessary to reasonably set the maximum waiting time TRMWT for token recovery.

令牌恢复的最大等待时间TRMWT定义如下:The maximum waiting time TRMWT for token recovery is defined as follows:

TRMWT=THT+MTTTDTRMWT=THT+MTTTD

其中,THT(Token Holding Time)为STA最大令牌持有时间,MTTTD(Max TokenTransmit Time Delay)为令牌在逻辑环上任意两个STA间传输所需时间的最大值。Among them, THT (Token Holding Time) is the maximum token holding time of STA, and MTTTD (Max TokenTransmit Time Delay) is the maximum time required for token transmission between any two STAs on the logical ring.

如果令牌重传两次后,主站还未侦听到该从站传出的令牌,就断定该从站出现故障。主站就将该从站从逻辑环上删除,并把令牌传给该从站的后继站。If the master station has not heard the token sent by the slave station after the token is retransmitted twice, it is concluded that the slave station is out of order. The master station deletes the slave station from the logical ring, and passes the token to the successor station of the slave station.

3、从站STA的加入和退出过程3. The joining and exiting process of the slave station STA

(1)从站的加入过程:①由主站控制,主站的队列为空时发送Solicit_Successor;②欲加入系统的从站在收到Solicit_Successor后将主站设为其前驱站,将主站的后继站设为它的继站,并向主站发送Set_Sucessor;③主站收到Set_sucessor后,将该从站设为它的后继站,并向其先前的后继站发送前驱站设置帧为Set_Predecessor;④主站先前的后继站收到Set_Predecessor后将该从站设为其前驱站,并向主站发送确认帧Ack;⑤主站在收到Ack帧后就将令牌传递给此新加入的从站,至此人站的加入过程完成。各从站点的加入过程如图8所示。(1) The joining process of the slave station: ① controlled by the master station, when the queue of the master station is empty, send Solicit_Successor; Set the successor station as its successor station, and send Set_Sucessor to the master station; ③ After the master station receives Set_sucessor, set the slave station as its successor station, and send the predecessor station setting frame as Set_Predecessor to its previous successor station; ④After receiving the Set_Predecessor, the former successor station of the master station sets the slave station as its predecessor station, and sends an acknowledgment frame Ack to the master station; ⑤The master station passes the token to the newly added slave station after receiving the Ack frame Station, so far the joining process of the human station is completed. The joining process of each slave station is shown in Figure 8.

(2)从站的退出过程:比加入过程简单,①想退出的从站在收到令牌后向其前驱站发送Set_Successor;②其前驱站收到Set_Successor后将该从站的后继站设为它的后继站,并向该从站的后继站发送Set_Successor;③该从站的后继站收到Set_Successor后向该从站回送Ack帧;④从站收到Ack帧后将令牌传给其后继站并退出。各从站的退出过程如图9所示。(2) The exit process of the slave station: it is simpler than the joining process. ①The slave station that wants to exit sends Set_Successor to its predecessor station after receiving the token; ②After the predecessor station receives the Set_Successor, set the successor station of the slave station as Its successor station, and send Set_Successor to the successor station of the slave station; ③The successor station of the slave station returns the Ack frame to the slave station after receiving the Set_Successor; ④The slave station passes the token to its successor after receiving the Ack frame stand and exit. The exit process of each slave station is shown in Figure 9.

4、本实施例中的6种特殊的帧格式如下:4. The six special frame formats in this embodiment are as follows:

1).令牌帧的格式1). The format of the token frame

如图2所示,其中FC(Frame Control)指明帧的类型(令牌,令牌控制帧等),Seq(Sequence)为STA的逻辑号,PreA(Predecessor Address)为前驱站地址,LA(LocalAddress)为本地站地址,SucA(Successor Address)为后继站地址,TRC(Token RotateCounter)为令牌在环中循环的次数,Res(Reserve)为保留字段。As shown in Figure 2, FC (Frame Control) indicates the type of frame (token, token control frame, etc.), Seq (Sequence) is the logic number of STA, PreA (Predecessor Address) is the address of the predecessor station, LA (LocalAddress ) is the address of the local station, SucA (Successor Address) is the address of the successor station, TRC (Token RotateCounter) is the number of times the token circulates in the ring, and Res (Reserve) is a reserved field.

令牌帧中的PreA,LA,SucA为建立连接表提供了信息。主站侦听到令牌帧后,取出其中PreA、LA、SucA字段的信息与连接表中的信息相比较。如果信息有变化则更新连接表,否则简单的丢弃。其中SucA还指明了令牌帧的接收站地址。PreA, LA, SucA in the token frame provide information for establishing the connection table. After the master station detects the token frame, it takes out the information in the PreA, LA, SucA fields and compares it with the information in the connection table. If the information has changed, the connection table is updated, otherwise it is simply discarded. Among them, SucA also indicates the receiving station address of the token frame.

Seq的操作由主站和从站共同完成,主站的序列号总是为0,每当从站收到令牌,它就把令牌中的Seq字段加1。当令牌回到主站时,主站把Seq字段清零。序列号Seq可以使主站清楚的知道目前逻辑环中从站的个数。The operation of Seq is completed jointly by the master station and the slave station. The serial number of the master station is always 0. Whenever the slave station receives the token, it adds 1 to the Seq field in the token. When the token returns to the master station, the master station clears the Seq field. The serial number Seq can make the main station clearly know the number of slave stations in the current logical ring.

TRC由主站进行控制,每当主站收到令牌,它就把TRC加一,如此循环往复。TRC is controlled by the master station. Whenever the master station receives the token, it adds one to the TRC, and so on.

2).Solicit_Successor帧的格式2). The format of the Solicit_Successor frame

如图3,其中FC指明帧的类型,HA为主站的地址,HSucA为主站后继站的地址,Br表示该帧用于广播。As shown in Figure 3, FC indicates the type of the frame, HA is the address of the master station, HSucA is the address of the successor station of the master station, and Br indicates that the frame is used for broadcasting.

3).Set_Successor帧的格式3). Format of the Set_Successor frame

如图4,其中FC指明帧的类型,SA为该帧的源地址,DA为该帧的目的地址,SucA为设置的后继站地址。As shown in Figure 4, FC indicates the type of the frame, SA is the source address of the frame, DA is the destination address of the frame, and SucA is the address of the set successor station.

4).Set_Predecessor帧的格式4). Format of the Set_Predecessor frame

如图5,其中FC指明帧的类型,SA为该帧的源地址,DA为该帧的目的地址,PreA为设置的前驱站地址,AA指明Ack帧回送的目的地址。As shown in Figure 5, FC indicates the type of the frame, SA is the source address of the frame, DA is the destination address of the frame, PreA is the address of the predecessor station set, and AA indicates the destination address of the Ack frame return.

5).Ack帧的格式5). The format of the Ack frame

如图6,其中FC指明帧的类型,SA为该帧的源地址,DA为该帧的目的地址。As shown in Figure 6, FC indicates the type of the frame, SA is the source address of the frame, and DA is the destination address of the frame.

6).数据帧的格式6). The format of the data frame

如图7,其中FC指明帧的类型,Duration为本数据帧传送的预计时限Duration,SA为该帧的源地址,DA为该帧的目的地址,PC为数据包的优先级别,Data为数据域,CRC为循环冗余校验码。As shown in Figure 7, FC indicates the type of the frame, Duration is the expected time limit for the transmission of the data frame Duration, SA is the source address of the frame, DA is the destination address of the frame, PC is the priority level of the data packet, and Data is the data field , CRC is a cyclic redundancy check code.

Claims (2)

1. protocol control method towards wireless industrial control network, its communication model is made up of physical layer, data link layer and application layer, described physical layer and application layer adopt international standards respectively physical layer and the application layer of communication model OSI, it is characterized in that described data link layer is divided into two layers: following sublayer uses traditional carrier sense multiple access to insert the CSMA agreement as the wireless channel access control protocol; A kind of control protocol based on token is used in top sublayer, sets up a token logic box in totally interconnected wireless distribution system, thus the CSMA agreement of sublayer below the control; A token logic box self-healing mechanism is set, avoids making the token logic box lose efficacy because of losing of token; And determine a token logic box expansion and contractile mechanism, make network system can adapt to the adding of each mobile site automatically and withdraw from variation; Described use is based on the control protocol of token, and the step of setting up the token logic box in totally interconnected wireless distribution system is as follows:
When (1) initial, each site STA at first enters reset mode, intercepts channel then, waits for that the invitation of main website adds;
(2) main website gets and resets earlier after electric, generates a token Token then;
(3) token Token transmits successively along logic box, up to etc. the site STA of Frame to be sent receive it, its sends and reads to ask frame Solicit_successor then, invites other slave station to add;
(4) after other slave station listens to Solicit_Successor, keep out of the way one and send successor at random behind the time slot frame Set_successor is set, competing successful website becomes the successor of main website;
(5) successor is set to its successor in the previous follow-up station of main website again.Concerning the slave station of first adding, the previous successor of main website is exactly a main website itself, constitutes an initial token logic box that contains 2 websites thus;
(6) be that token holding time THT did not also exhaust after sky or Frame transmission disposed as if the wait task formation, main website just sends Solicit_successor again, invites other slave station to add;
(7) according to step (1)~(6) mechanism, after experience a period of time, each website in the wireless distribution system will be set up into a token logic box automatically, thereby forms a network system;
The self-healing step of described token logic box self-healing mechanism is as follows:
(1) main website generates a token and transmits on ring after setting up the token logic box, and each token that slave station sends is intercepted by main website then;
(2) in main website, set a token and recover and maximum latency TRMWT, hear a token, just TRMWT is resetted when the main website frame;
(3) also do not listen to next token after the TRMWT of main website exhausts, it just thinks token lost, and the connection table information according to storage in advance generates a new token and sends to the website of losing token then;
Described token logic box expansion and contractile mechanism, determine the adding of slave station STA and withdraw from process as follows:
(1) adition process of slave station:
1. by main website control, main website sends Solicit_Successor when formation is sky;
What 2. desire added system is made as its predecessor with main website from standing in after receiving Solicit_Successor, and the successor of main website is made as its station of continuing, and sends Set_Sucessor to main website;
3. after Set_sucessor receives in main website, this slave station is made as its successor, and sending predecessor to its previous successor, frame is set is Set_Predecessor;
4. the previous successor of main website is made as its predecessor with this slave station after receiving Set_Predecessor, and sends acknowledgement frame Ack to main website;
5. main website just passes token to this initiate slave station after receiving the Ack frame, and so far, the adition process of slave station is finished;
(2) process that withdraws from of slave station:
That 1. wants to withdraw from sends Set_Successor to its predecessor from standing in after receiving token;
2. its predecessor is received behind the Set_Successor successor that the successor of this slave station is made as it, and sends Set_Successor to the successor of this slave station;
3. the successor of this slave station is received behind the Set_Successor to this slave station loopback Ack frame;
4. slave station is received and token is passed to its successor behind the Ack frame and log off.
2. the protocol control method towards wireless industrial control network according to claim 1, it is characterized in that described token frame, claim frame, successor frame, predecessor being set, that the form of frame, Ack frame and Frame is set is as follows:
(1) form of token frame Token: contain frame type FC, logic number Seq successively, build table information SucA, this station address LA, predecessor address PreA and token period TRC;
(2) form of claim frame Set_Successor: contain frame type FC, broadcasting Br, the successor address HSuoA of main website and the address HA of main website successively;
(3) successor is provided with the form of frame Set_Successor: contain frame type FC, destination address DA, successor address SucA and this frame source address successively;
(4) predecessor is provided with the form of frame Set-Predecessor: contain frame type FC, destination address DA, this frame source address SA, predecessor address PreA and Ack frame successively and return destination address;
(5) form of Ack frame: contain frame type FC, destination address DA and this frame source address SA successively;
(6) form of Frame: priority level PC, the data Data and the cyclic redundancy check (CRC) code CRC that contain expectation time limit Duration, destination address DA that frame type FC, notebook data frame transmit, this frame source address SA, data successively.
CNB2006101191389A 2006-12-05 2006-12-05 Protocol control method towards wireless industrial control network Expired - Fee Related CN100556044C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101191389A CN100556044C (en) 2006-12-05 2006-12-05 Protocol control method towards wireless industrial control network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101191389A CN100556044C (en) 2006-12-05 2006-12-05 Protocol control method towards wireless industrial control network

Publications (2)

Publication Number Publication Date
CN1964353A CN1964353A (en) 2007-05-16
CN100556044C true CN100556044C (en) 2009-10-28

Family

ID=38083242

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101191389A Expired - Fee Related CN100556044C (en) 2006-12-05 2006-12-05 Protocol control method towards wireless industrial control network

Country Status (1)

Country Link
CN (1) CN100556044C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11323153B2 (en) 2019-07-29 2022-05-03 Enphase Energy, Inc. Protocol for multi-master communication coordination on shared media channel

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2209346A3 (en) 2009-01-19 2011-11-23 Siemens Aktiengesellschaft A method for data transmission in a local area network
CN101729231B (en) * 2009-12-03 2013-05-29 北京和利时系统工程有限公司 Industrial Ethernet in distributed control system
CN104468302B (en) * 2014-10-16 2018-03-30 深圳市金证科技股份有限公司 A kind of processing method and processing device of token
CN113162868B (en) * 2021-02-24 2023-10-03 宏晶微电子科技股份有限公司 Data transmission method, data transmission station and communication system of Ethernet

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
基于RFieldbus的Token-Passing协议实时性能建模. 侯维岩,费敏锐,汪敏,陈伯时.系统仿真学报,第17卷第2期. 2005
基于RFieldbus的Token-Passing协议实时性能建模. 侯维岩,费敏锐,汪敏,陈伯时.系统仿真学报,第17卷第2期. 2005 *
无线现场总线RFieldbus的实时性分析和研究. 侯维岩.上海大学博士论文. 2004
无线现场总线RFieldbus的实时性分析和研究. 侯维岩.上海大学博士论文. 2004 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11323153B2 (en) 2019-07-29 2022-05-03 Enphase Energy, Inc. Protocol for multi-master communication coordination on shared media channel

Also Published As

Publication number Publication date
CN1964353A (en) 2007-05-16

Similar Documents

Publication Publication Date Title
US10897762B2 (en) Wireless communication system, wireless communication apparatus, wireless communication method, and computer program
US9036612B2 (en) Wireless communication method and system with collision avoidance protocol
AU2008200541B2 (en) Nearly collision-free channel access system and method
JP5536077B2 (en) Method for improving channel utilization in a TDMA-based protocol
CN102685920B (en) Double-channel reservation access control method in mobile Ad Hoc network
CN101197826B (en) Method for solving problems of multi-jumping wireless self-network grouping concealed terminal and exposed terminal
CN103248436B (en) Method for avoiding hidden terminal and exposed terminal of underwater acoustic communication network
CN103763076B (en) Cooperative MAC protocol implementation method on basis of multiple asynchronous channels in vehicular vdhoc networks
WO2015030339A1 (en) Method and apparatus for reporting information about transmission failure frame
CN100556044C (en) Protocol control method towards wireless industrial control network
CN108495372A (en) In a kind of WLAN in cell multi-site Simultaneous Transmission of Data method
KR100770073B1 (en) Method and Apparatus for Efficient Data Broadcast Within Beaconing Network
US11251933B2 (en) Collision avoidance in multi-hop ad-hoc networks using half duplex transceivers
CN112543040B (en) Efficient BPLC network networking method
CN102158331A (en) MAC (Media Access Control) layer reliable multicasting method of wireless ad hoc network
CN109922537B (en) Wireless module and implementation method thereof
JP6432294B2 (en) COMMUNICATION SYSTEM, COMMUNICATION SYSTEM CONTROL METHOD, AND PROGRAM
CN104066206A (en) A Cooperative Medium Access Control Protocol Based on Double Priority Selection
CN101291296B (en) A Method of Reducing Media Access Conflicts in Wireless Local Area Networks Through Cross-Layer Structure
CN104660524A (en) Channel access control method and system of power line communication network
Garcia-Luna-Aceves Implementing correct and efficient collision avoidance in multi-hop ad-hoc networks
CN107659997A (en) A kind of access mechanism system of selection of DCF agreements of IEEE 802.11 and system
KR20110070208A (en) Multicast Frame Forwarding Method in Wired and Wireless Bridges
Yamada et al. Enhancement of mesh network oriented IEEE 802.11 MAC protocol
CN110034822B (en) A method and system for multi-user visible light bidirectional communication based on dynamic token

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C53 Correction of patent for invention or patent application
CB03 Change of inventor or designer information

Inventor after: Hou Weiyan

Inventor after: Ma Daolin

Inventor before: Hou Weiyan

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: HOU WEIYAN TO: HOU WEIYAN MA DAOLIN

C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091028

Termination date: 20121205