The data transfer device of Zigbee protocol and GOOSE agreement during a kind of small power station IED nets
Technical field
The present invention relates to the data transfer device of Zigbee protocol and GOOSE agreement in a kind of small power station IED net.
Background technology
At present, measurement IED equipment and upper strata for gathering Various types of data in hydroelectric station store for data, process, the traditional approach of hydroelectric station compunication diagnosed adopts fiber optic Ethernet to carry out wire transmission.In all parts of the country in develop actively small power station in recent years; small power station is generally seated in the more inconvenient mountain area of traffic; the environment residing for measurement IED equipment of image data is often more special; the geographical environment of difficulty has extremely strong restrained force by the wiring installation of cable network; and set up cable and need a large amount of man power and materials; after setting up what a communication network, usually can increase new IED equipment because of demand in addition, cause the constructions such as rewiring.Angularly all challenge is brought to Ethernet wire transmission mode from applied environment, construction cost and follow-up autgmentability.
Nowadays, the short distance wireless communication technology plays more and more important role in people's life.Wireless sensor network WSN belongs to cordless communication network, forms, the network system of the self-organizing of the multi-hop formed by communication by being deployed in a large amount of sensor node in surveyed area.Relative to other wireless communication technologys, the many advantages such as low cost, low-power consumption of ZigBee technology makes it show one's talent gradually in keen competition, be conducive to the automatic collection of data, treatment and analysis, be conducive to effective enforcement of decision support system (DSS), can Successful utilization in multiple field such as Industry Control, intelligent grid.
IEC61850 standard specifies that general object-oriented transformer substation case GOOSE message adopts specific communication to map, and maps directly to data link layer and physical layer.Different with other messages is that GOOSE message does not re-use ICP/IP protocol stack and communicates with network device driver, but the transmission of the message that directly communicated with device drives and reception.
GOOSE achieves real P2P communication, and any one IED is connected by Ethernet with other IED, namely can be used as subscription end reception data, also can be used as publishing side for other IED and provides data.Collection Value Data is sent to intelligent electronic device (IED) by Ethernet by transducer, IED sends the data to upper strata small power station computer system again, keeper can be configured small power station's IED network and manage by small power station's computer system accordingly, issues monitoring task and collects Monitoring Data.
The frame format of the GOOSE message of IEC61850 comprises MAC destination address, mac source address, and TPID, TCI, Ethertype=0x88B8, APPID, Length, MAC fill, and MAC calculates inspection CRC.GOOSE message belongs to multicast information, IEC61850 standard points out that the multicast mac address scope of GOOSE message is 01-0C-CD-01-00-00 to 01-0C-CD-01-01-FF, namely gateway receive Ethernet bag target MAC (Media Access Control) address between above-mentioned scope and ethernet type is 0X88B8, then think that this Ethernet bag is GOOSE message.
Zigbee wireless data frame structure comprises frame control, sequence number, object ID, source ID, load, frame check.The ID of gateway node because wireless sense network is sent to object ID in the Zigbee wireless data frame of GOOSE net, source ID is the ID measuring IED, so after different users sends order, change through gateway protocol, measure IED and do not know requesting party's user profile, the present invention adds a source MAC item and is used for identification request side's user profile in Zigbee wireless data frame structure, the target MAC (Media Access Control) address encapsulating new GOOSE Ethernet bag is just known like this when gateway receives when wireless sense network is sent to the Zigbee wireless data frame of GOOSE net, improve the efficiency of translation-protocol.In addition, measure IED equipment and may send the same packet in a short period of time, increase the workload of gateway node and the throughput causing radio sensing network lower, the present invention first judges before protocol conversion whether the current time of this measurement IED transmission packet and the interval in previous forwarding moment exceed setting-up time interval 10ms, if do not exceeded, think that this Frame repeats to send, judge the protocol conversion workload that effectively can reduce gateway node by the time interval.
Summary of the invention
Existing small power station IED measures between IED equipment and computer system in netting and adopts the mode of GOOSE net wire communication can not adapt to the extensibility of routing feasibility, economies and the network that small power station IED nets under application circumstances, therefore the measurement IED equipment gathering Various types of data adopts sensor network technology to be very necessary, and wherein key issue needs to carry out based on the wireless sense network access small power station IED net of Zigbee protocol the data transaction that ZigBee technology agreement and GOOSE net.
For the problems referred to above, the invention provides the data transfer device of Zigbee protocol and GOOSE agreement in a kind of small power station IED net, Effective judgement can be carried out to the Frame received by arranging gateway device, again required information is obtained to the mapping table retrieval in gateway, after forwarding time, interval judged, former Frame encapsulation is obtained the dataframe of neotectonics to object network.The method can realize the transmission data transaction of wireless sense network ZigBee technology agreement and GOOSE network in small power station IED net effectively, very little to the consumption of gateway CPU, and the compatibility that improve network error bag, effectively inhibit the forwarding of redundant data packets.
The technical solution adopted for the present invention to solve the technical problems is:
A data transfer device for Zigbee protocol and GOOSE agreement during small power station IED nets, described method comprises the following steps:
(1) allocate No. ID in advance and set up mapping table in a gateway
(1.1) for gateway node with measure IED and all distribute one unique No. ID;
(1.2) mapping table is set up in a gateway.Mapping table comprises No. ID of measurement IED, measures MAC Address, the previous forwarding moment three of IED;
(1.3) confirm No. ID and the MAC Address of each measurement IED in wireless sense network in mapping table, ensure its one_to_one corresponding;
(2) gateway receives the Ethernet bag that station level is sent
(2.1) Frame being sent to process layer side is determined whether, basis for estimation: the target MAC (Media Access Control) address of this Frame is whether within the scope of the multicast mac address of GOOSE message;
(2.2) determine whether that GOOSE message maps directly to the Frame of data link layer, whether gateway is that 0X88B8 judges according to the ethernet type of this Frame;
(2.3) according to all entry n of the target MAC (Media Access Control) address retrieval mapping table of this Frame, in the MAC Address row measuring IED, n-th line coupling is walked to from the 1st successively;
(2.4) No. ID of corresponding measurement IED is obtained after matching the MAC Address of identical measurement IED;
(2.5) Zigbee wireless data frame is dressed up in Ethernet encapsulating, in address entries, newly-increased source MAC item inserts the source MAC of former Ethernet bag.No. ID of measurement IED is No. ID, the object of new wireless data frame, and No. ID of gateway is No. ID, the source of new wireless data frame;
(2.6) measure to object the Zigbee wireless data frame that IED sends neotectonics;
(3) gateway receives the Zigbee wireless data frame that process layer is sent
(3.1) determine whether the Frame being sent to station level side, whether gateway identically judges according to No. ID of No. ID, the object of Zigbee wireless data frame and gateway,
(3.2) according to all entry n of No. ID, the source retrieval mapping table of this Frame, in No. ID row measuring IED, n-th line coupling is walked to from the 1st successively;
(3.3) MAC Address of corresponding measurement IED and previous forwarding moment is obtained after matching No. ID of identical measurement IED;
(3.4) whether compare the interval in current time and previous forwarding moment more than 10ms, if be greater than 10ms just upgrade the previous forwarding moment in mapping table, otherwise think that this Frame repeats to send;
(3.5) Zigbee wireless data frame is packaged into GOOSE Ethernet bag, in this Frame, source MAC is the target MAC (Media Access Control) address of new Ethernet bag, and the MAC Address measuring IED is the source MAC of new Ethernet bag;
(3.6) the GOOSE Ethernet bag of neotectonics is sent to GOOSE net.
Operation principle of the present invention is in all parts of the country in develop actively small power station in recent years, small power station is generally seated in the more inconvenient mountain area of traffic, the environment residing for measurement IED equipment of image data is often more special, and the wire communication of tradition erection cable brings challenge to the wiring installation that small power station IED nets.Therefore the measurement IED equipment gathering Various types of data adopts sensor network technology to be very necessary, effectively can solve the complexity of wire communication wiring and reduce expending of manpower and materials.The many advantages such as the low cost of ZigBee technology, low-power consumption are utilized to apply in small power station IED net, so successfully being accessed by Zigbee wireless sense network in GOOSE net is key issue.The present invention adopts the algorithm of a newly-increased gateway node to complete the protocol conversion between heterogeneous networks, and making Zigbee wireless sense network access GOOSE net becomes possibility.
The present invention proposes the data transfer device of Zigbee protocol and GOOSE agreement in a kind of small power station IED net, completes protocol conversion by increasing gateway node.Owing to have employed wireless communication mode between the station level computer of script wired connection and the measurement IED of process layer, be form wireless sensor network, distribute unique No. ID for small power station IED nets, the fail safe of wireless sensor network can be improved.By setting up the mapping table of a MAC NIC address, IED numbering and previous forwarding moment composition, this method solve the protocol conversion problem from GOOSE net to Zigbee wireless sense network.Filter the Frame of makeing mistakes or repeat by carrying out Effective judgement to the Frame received, the method can improve the efficiency of protocol conversion.Newly-increased source MAC item in Zigbee wireless data frame structure, directly know the MAC Address of the subscriber computer sent request when making IED send data, institute's extracting method can carry out protocol conversion fast, very little to the consumption of gateway CPU, performance is higher, can suppress retransmitted redundant packet.
Beneficial effect of the present invention is mainly manifested in: 1, conversion method is effective; 2, protocol conversion is quick; 3, redundant data packets can be suppressed.
Accompanying drawing explanation
The flow chart of the data transfer device of Zigbee protocol and GOOSE agreement during Tu1Shi small power station IED nets.
The structure chart of the data conversion system of Zigbee protocol and GOOSE agreement during Tu2Shi small power station IED nets.
Embodiment
Below in conjunction with accompanying drawing, the invention will be further described.
With reference to Fig. 1, the data transfer device of Zigbee protocol and GOOSE agreement during a kind of small power station IED nets, comprises the following steps:
The first step: distribute unique No. ID for small power station IED nets, comprise gateway node and all measurement IED equipment.
Second step: set up a mapping table in a gateway.Mapping table comprises No. ID of measurement IED, measures MAC Address, the previous forwarding moment three of IED.
3rd step: gateway receives the Ethernet bag that station level is sent.
4th step: determine whether the Frame being sent to process layer side.Whether gateway judges according to the target MAC (Media Access Control) address of this Frame within the scope of the multicast mac address of GOOSE message, if not just being abandoned by this Frame.
5th step: determine whether that GOOSE message maps directly to the Frame of data link layer.Whether gateway is that 0X88B8 judges according to the ethernet type of this Frame, if not just being abandoned by this Frame.
6th step: according to all entry n of the target MAC (Media Access Control) address retrieval mapping table of this Frame.
7th step: walk to n-th line coupling from the 1st successively in the MAC Address row measuring IED, judge whether to retrieve this target MAC (Media Access Control) address, just abandons this Frame if circulation terminates still not obtain coupling.
8th step: obtain No. ID of corresponding measurement IED after matching the MAC Address of identical measurement IED.
9th step: Zigbee wireless data frame is dressed up in Ethernet encapsulating.In address entries, newly-increased source MAC item inserts the source MAC of former Ethernet bag.No. ID of measurement IED is No. ID, the object of new wireless data frame, and No. ID of gateway is No. ID, the source of new wireless data frame.
Tenth step: measure the Zigbee wireless data frame that IED sends neotectonics to object.
11 step: gateway receives the Zigbee wireless data frame that process layer is sent.
12 step: determine whether the Frame being sent to station level side.Whether gateway identically judges according to No. ID of No. ID, the object of Zigbee wireless data frame and gateway, is just abandoned by this Frame if different.
13 step: according to all entry n of No. ID, the source retrieval mapping table of this Frame.
14 step: walk to n-th line coupling from the 1st successively in No. ID row measuring IED, judge whether to retrieve No. ID, this source, just abandons this Frame if circulation terminates still not obtain coupling.
15 step: obtain the MAC Address of corresponding measurement IED and previous forwarding moment t after matching No. ID of identical measurement IED.
16 step: whether compare the interval in current time and previous forwarding moment more than 10ms, if be less than 10ms just think that this Frame repeats to be abandoned.If be greater than 10ms just upgrade the previous forwarding moment in mapping table.
17 step: Zigbee wireless data frame is packaged into GOOSE Ethernet bag.In this Frame, source MAC is the target MAC (Media Access Control) address of new Ethernet bag, and the MAC Address measuring IED is the source MAC of new Ethernet bag.
18 step: the GOOSE Ethernet bag sending neotectonics to GOOSE net.
The present embodiment devises the data transfer device of Zigbee protocol and GOOSE agreement in a kind of small power station IED net.The method by increasing the data transaction that rapid interactive method solves GOOSE agreement and Zigbee wireless network protocol in gateway node.Measurement IED equipment and gateway node for gathering Various types of data in small power station constitute the wireless sense network based on Zigbee protocol, and this wireless sense network is connected to GOOSE net by gateway device.Allocate No. ID in advance and first the method can carry out Effective judgement to the Ethernet bag received under set up a mapping table in gateway, obtain No. ID that measures IED according to target MAC (Media Access Control) address retrieval mapping table, finally Zigbee wireless data frame is dressed up in Ethernet encapsulating and send.The method can carry out Effective judgement to the Zigbee wireless data frame received equally accordingly, the MAC Address and previous forwarding moment of measuring IED is obtained by mapping table, the time interval is judged, thus abandon redundant data packets, finally Zigbee wireless data frame is packaged into GOOSE Ethernet bag and sends.The method can be filtered the Frame that redundancy repeats the Effective judgement of Frame, improves the conversion efficiency of data content in agreement.The method can solve complexity, the restriction of traditional hydroelectric station IED net wire communication effectively by sensor network technology.
With reference to Fig. 2, during a kind of small power station IED that application this method realizes nets, the data conversion system of Zigbee protocol and GOOSE agreement, mainly comprises: the conversion subsystem of Zigbee protocol and GOOSE agreement, data statistic analysis subsystem.
The conversion subsystem of described Zigbee protocol and GOOSE agreement comprises:
(1) protocol conversion pretreatment module: in advance for small power station IED net in measure IED and gateway distributes unique No. ID, and in gateway, set up a mapping table, for protocol conversion is ready.
(2) Frame Effective judgement module: carry out Effective judgement to the Frame received, filters the Frame of the repetition that makes mistakes.
(3) protocol conversion encapsulation of data frame module: after mapping table retrieval obtaining information, former Frame encapsulation is obtained the dataframe of neotectonics to object network.
Described data statistic analysis subsystem comprises:
(1) GOOSE message statistical analysis module: the analysis result of the GOOSE message of statistical system.
(2) Zigbee counting messages analysis module: the analysis result of the Zigbee message of statistical system.