A kind of emulation modelling method of transformer station's prudential sub-station
Technical field
The present invention relates to the technical field of power automatic system simulation modeling, more particularly to a kind of transformer station's prudential sub-station
Modeling and simulating method.
Background technology
Chief component of transformer station's prudential sub-station as relay protection information system, it is following 103 communication protocols
On the basis of with the intelligent electronic device (IED such as relay protection, fault oscillograph, automatic safety device:Intelligent
Electronic Device) communicate, normal operation, abnormality alarming and the fault message of these devices are collected, by preliminary treatment
It is sent on afterwards positioned at dispatching terminal main website, realizes the interactive communication with main website.At present due to lacking effective analysis method and dividing
Analysis instrument, the performance evaluation of the application system such as network and its relay protection is assessed with research between being stood for boss is almost blank,
Station end data properties of flow analysis could not be combed it is clear, therefore in order to realize station end data stream Quantitative Simulation analysis to Substation Station
End equipment modeling becomes very necessary and urgent, and prudential sub-station is as relay protection information interconnection transformer substation end and scheduling
The important bridge at center, bears collection, processing, storage and the teletransmission task of transformer substation end protection information stream, therefore carries out net
Network carries out becoming more meticulous modeling when emulating to it seems extremely important to simulate its data flow characteristics.
In existing simulation analysis, international communication simulation software OPNET due to the modeling mechanism with stratification, towards right
The advantages that modeling feature of elephant, integrated analysis tool, the simulation analysis of electric power communication network are gradually applied to recently,
But the application of the existing models of OPNET and function is remained in, qualitative analysis is also limited to network modelling emulation.To realize power transformation
Prudential sub-station of standing data flow characteristic is analyzed, and gives full play to OPNET modeling and simulating advantages, therefore propose a kind of transformer station's prudential sub-station
Emulation modelling method realize the modeling that becomes more meticulous to prudential sub-station.
To realize to transformer station's prudential sub-station data flow characteristic analysis, presently mainly built using the network based on OPNET
Mould emulation mode, the standard seven layer protocol model directly carried using system are modeled imitative to transformer station's prudential sub-station data flow
True analysis.Standard seven layer protocol model includes application layer, expression layer, session layer, transport layer, Internet, data link layer and thing
Manage layer.Message is parsed by each layer protocol when its physical layer receives message, according to the calling of main website, order etc. and
The relevant information demand of substation is sent to from station equipment, the message information stream attribute in application layer according to prudential sub-station applied business
Such as type of message, size is configured, and forms prudential sub-station applied business packet, according still further to the cycle generation of giving out a contract for a project of configuration
Service message, its standards service provided according to seven layer protocols carry out message encapsulation, finally sent by the device port of physical layer.
Following deficiency be present in above-mentioned existing emulation modelling method:(1) the existing model of OPNET emulation platforms lacks to electric power
The modeling of the communication protocol message of system 103, it is impossible to truely and accurately describe prudential sub-station data processing and inversion network performance, imitate
True result is difficult to quantitative analysis;(2) directly replace protecting letter using seven layer protocol models of emulation platform system standard
Model of standing carries out simulation analysis, it is impossible to the actual process of real embodiment prudential sub-station message, in Message processing and delay side
Larger error be present in face.
The content of the invention
It is an object of the invention to provide a kind of emulation modelling method of transformer station's prudential sub-station.This method is sub according to letter is protected
Data transfer of standing feature, the modeling to five layers of communication protocol of prudential sub-station in OPNET emulation platforms is realized, made up original imitative
True mode continues to use the deficiency of seven layers of communication protocol always;The peculiar model of 103 stipulations is established in application layer simultaneously, makes simulation model more
Adduction reason is accurate.
The purpose of the present invention can be realized by following technical measures:
Present invention contrast prior art, has the following advantages:
A kind of emulation modelling method of transformer station's prudential sub-station, including network domains modeling, nodes domains modeling, the modeling of process domain
Three parts content;Wherein:
Network domains model:In network domains, relay is built by the information transmission equipment between main website, substation and main website and substation
Protection information system;Transformer station's prudential sub-station model follows 103 communication protocols and communicated with intelligent electronic device, collects intelligence electricity
Normal operation, abnormality alarming and the fault message of sub- equipment, believe master by the guarantor being sent in preliminary treatment afterwards positioned at dispatching terminal
Stand, realize the interactive communication with main website;
Nodes domains model:According to 103 communication protocols, five layers of communication protocol of prudential sub-station are established, are respectively:Physical layer, number
According to link layer, Internet, transport layer and application layer;
Wherein, the nodes domains of the physical layer include:Receiving module, sending module, package module and parsing module;
The nodes domains of the Internet include routing module;
The nodes domains of the transport layer include interface module;
The nodes domains of the application layer include processing module and message generation module;
Process domain models:Implementation process including processing module and message generation module;
(1) the following flow of the processing modules implement:
(11) when packet is sent to processing module from the interface module of transport layer, the interruption of " initialization " process is triggered,
The label of processing module is added in the packet, and then packet is transferred to " pretreatment " process;" pretreatment " is responsible for logarithm
Preliminary Analysis is carried out according to bag, obtains corresponding field information from packet to judge the source of the packet, in " pretreatment " process
In, when acquisition TYP fields belong to control direction, the bag will be sent toward " control " process, when TYP fields belong to monitoring direction
When, the bag will be sent toward " monitoring " process;
(12) packet that described " control " process receives comes from main website, and packet is further processed:Parsing should
Packet, the particular content from main website packet is obtained, judge the function of the packet, then decide whether to call substation
Information;If the packet content includes the information of main website, " calling " process is transferred to, is processed again by " calling " process;
If the packet content is other information, the packet is transferred to " processing module interface " process;The information of the main website
Including reading substation configuration, calling device fault history information;The other information includes protection information, the failure of calling device
Oscillograph failure file.
(13) after described " callings " process receives the information of " control " process, particular content that reading needs call, to " depositing
Storage " process sends call instruction;After receiving from the content that " storage " progress feedback is returned, processing is encapsulated, is then sent through
" processing module interface " process;
(14) information type that described " monitoring " process receives has:The configuration/parameter information of sub-station device, normal operation shape
These data are divided into two major classes by state information, abnormality alarming information, fault message and fault related data, " monitoring " process:One
Class is to need the information of direct Shang Song main websites, including plant running status information, abnormality alarming information;It is another kind of to be stored in substation
Inside, main website calling is waited to recall;After " monitoring " process receives packet, perform and judge order, if finding the bag content
It is type I information, then directly transmits toward " processing module interface ", if the bag content is the second category information, be saved in " storage "
Process;
(15) " storage " process is receiving protection device configuration/parameter information, fault oscillograph configuration/parameter letter
When breath, plant failure historical information, directly stored in a manner of raw information;Receiving the recorder data from fault oscillograph
When, it is translated into and meets COMTRADE standards guiding file (* .HRD), configuration file (* .CFG), data file (* .DAT)
File format and after completing preservation, notify main website, " calling " process be then sent through when waiting main website calling;
(16) described " processing module interface " process is used to connect processing module and message generation module;Arrived when there is packet
During up to " processing module interface " process, transmission mechanism will be triggered, packet is sent to message generation module.
(2) message generation module realizes following flow:
(21) when packet reaches message generation module, " initialization " process is triggered, stream is produced and interrupts, into packet
The label of message generation module is added, then packet is transferred to " parsing " process;After " parsing " process receives packet, logarithm
Progressively parsed according to bag, each several part content is judged;When reading packet content and application protocol control information
APCI (Application Protocol Control Information) is relevant, then is sent to " APCI " process;Remaining information
It is sent to " ASDU " process;The ASDU is Application Service Data Unit, Application service data unit;
(22) " ASDU " process is for further processing to receiving packet, reads letter relevant with ASDU in packet
Breath, then using OPNET functions toward ASDU units filling corresponding to content, formed ASDU packets, after the completion of be sent to again
" APCI " process;
(23) " APCI " process carries out processing to the packet received and forms APCI packets, and the APCI is
Application Protocol Control Information, application protocol control information;
(24) finally, APCI packets and ASDU packet combinings are formed complete APDU messages by " APCI " process, then
" send " process is sent to, the APDU messages of generation are sent by " send " process.
In the step (22), " ASDU " process is as follows to receiving the process that data are further handled:
" ASDU " process first creates ASDU packets, then sets variables A-H, represents the type mark of ASDU packets respectively
Know symbol, varistructure determiner, transmission reason, Application service data unit public address, function type, message sequence number, information
Element set and markers this 8 fields;Then above-mentioned 8 fields of ASDU packets are progressively extracted, often extract a data just
It is assigned to corresponding variable;Just fill and correspond to toward ASDU packets one by one after above-mentioned 8 fields of ASDU packets have been extracted
Content, when complete ASDU data filling after filled after ASDU packets be sent to " APCI " process again;
" APCI " process carries out the process that processing forms APCI packets to the packet received in the step (23)
It is as follows:
First, create and fill APCI control domain packets, process is:
(a) because the packet from " parsing " process is divided into three major types:The monitoring work(of format transmission message type, numbering
Can type, unnumbered control function class;Described information transformat type is designated as I format, the function for monitoring class of the numbering
Type is designated as S forms, and the unnumbered control function class is designated as U forms;
" APCI " process receives the packet from " parsing " process, and the class of the packet is determined according to packet content
Type is I format, S forms or U forms, then creates and fill corresponding APCI control domains packet;
(a1) if the packet is I format, the APCI control domain packets of I format, the APCI control domain numbers are created
According to totally 4 byte-sized is wrapped, the first and second bytes is transmit Sequence Number, wherein the first bit of the first byte is fixed as the 0, the 3rd
It is Receiving Order row number with the 4th byte, wherein the first bit of the 3rd byte is fixed as 0, the information of remaining bit is then to need
To be filled according to the content for receiving packet;
(a2) if the packet is S forms, the APCI control domain packets of S forms, the APCI controls of S forms are created
Domain is equally 4 byte-sizeds, and the first bit of the first byte is 1, and remaining bit is 0, and all bits of the second byte are the 0, the 3rd
First bit of byte is 0, and remaining bit and nybble information then need to be filled according to the content for receiving packet;
(a3) if the packet is U forms, the APCI control domain packets of U forms, the APCI controls of U forms are created
Domain is equally 4 byte-sizeds, and the one or two bit of the first byte is 0, and remaining 6 bit is needed according to the packet content received
To fill, second to nybble all 0;
(b) APDU length is determined and obtains APCI packets:Because APCI packets include the startup word of 1 byte
Symbol, the APDU length of 2 bytes, the APCI control domains of 4 bytes, total size is 7 bytes;Therefore, " APCI " process, which receives, comes from
After the ASDU packets of " ASDU " process, parsing ASDU packets are first passed through, the ASDU data package sizes are obtained, due to APDU numbers
It is equal to APCI packets and ASDU packet sums according to the size of bag, and what the size of APCI packets was to determine, therefore determine
APDU length;The startup character of APCI packets is then filled with, it immobilizes as hexadecimal 68H;Then step
(a) result and APDU length pad complete the filling of APCI packets and obtain APCI numbers in APCI packets
According to bag.
The modeling of five layer protocols is realized in communication simulation platform, the true mould than seven layer protocols closer to prudential sub-station
It type, can more truly reflect processing procedure of the substation to packet, effectively improve the simulation accuracy of substation, shorten the place of packet
Reason delay, while provide a kind of new modeling approach to power system electrical secondary system simulation modeling.
Brief description of the drawings
Fig. 1 is nodes domains illustraton of model;
Fig. 2 is processing module fate map;
Fig. 3 is message generation module fate map;
Fig. 4 is that type of message and its function are illustrated;
Fig. 5 is 103 stipulations APDU message formats;
Fig. 6 is APDU message formats in OPNET;
Fig. 7 is the control domain of three types message.
Embodiment
OPNET provides the modeling pattern of stratification:Top is network domain models, network between major embodiment boss stands
Functional characteristic;Intermediate layer is node domain model, reflects service characteristic by corresponding protocol model;The bottom is process domain model,
Application protocol is described in a manner of finite state machine.Our invention is realized to prudential sub-station using the above-mentioned modeling patterns of OPNET
The foundation of model.
2.2.1.1 network domains model
In network domains, relay protection information system is by the information transmission equipment structure between main website, substation and main website and substation
Into.Transformer station's prudential sub-station model mainly on the basis of 103 communication protocols are followed with relay protection, fault oscillograph, safety
The intelligent electronic devices such as automatics communicate, and normal operation, abnormality alarming and the fault message of these devices are collected, by preliminary
It is sent on after processing positioned at dispatching terminal main website, realizes the interactive communication with main website.
2.2.1.2 nodes domains model
According to 103 stipulations, prudential sub-station uses five layers of communication protocol, is respectively:Physical layer, data link layer, Internet,
Transport layer and application layer.In OPNET simulation models, nodes domains realize the combination of prudential sub-station disparate modules, describe communication
Protocol architecture level.The characteristics of in conjunction with five layer protocols to processing data packets, nodes domains be divided into receiving module, parsing module,
Eight routing module, interface module, processing module, message generation module, package module and sending module modules, the association of itself and five layers
Relation between view is as shown in Figure 1.
Each module is as follows to the processing procedure of packet in nodes domains:First, physical layer is received external by physical medium
The data flow that equipment sends over, convert it into the package module that bit stream form is sent to data link layer;Then, Encapsulation Moulds
Block is packaged to form data frame to the bitstream data from physical layer, fills out corresponding source address and purpose in a data frame
Address, then up it is sent to the routing module of Internet;Then, routing module forms packet again to the Frame processes received,
Passage path selection simultaneously, combination, entry/exit route test, packet is sent to the interface module of transport layer;When packet arrives
During up to interface module, the transmission service mechanism of the module is triggered, selects corresponding service to carry out processing data bag, and divide when necessary
Cut data, it is ensured that data can correctly, be intactly sent to application layer;Finally, the processing module of application layer is by judging packet
The order of main website in source, read data packet, according to processing steps such as the information of main website command calls storage process, then by message
Generation module is parsed to the packet received, and parsing content is sent to corresponding APCI and ASDU processes, last profit respectively
103 stipulations messages are formed with using OPNET function op_pk_nfd_set (), then are down transmitted in layer, finally in physics
The sending module of layer forms bit and streams to external equipment.From physical layer to transport layer, the present invention uses the original communications of OPNET
Model is handled packet, is the core of the present invention using layer model, is the carrier that prudential sub-station function is realized, its
The processing procedure of packet is embodied in OPNET process domain models, detailed modeling principle is as described below.
2.2.1.3 process domain models
Prudential sub-station concrete function be using tri- layers of modeling mechanisms of OPNET process domain in finite state machine, C language, with
And the OPNET core functions that carry are realized.Prudential sub-station application layer model contains processing module and message generation module,
Its model structure difference as shown in Figures 2 and 3, illustrates processing procedure of the packet in application layer in process domain.
(1) processing module
When packet is sent to processing module from the interface module of transport layer, the interruption of " initialization " process is triggered, in number
" pretreatment " process is transferred to according to the label that the module is added in bag, and then packet." pretreatment " is responsible for entering packet
Row Preliminary Analysis, corresponding field information is obtained to judge the source of the packet from packet, 103 stipulations are to prudential sub-station data
Source is divided into two classes:A kind of is the packet (control direction) from main website control direction, and a kind of is the number from non-main website direction
It is as shown in Figure 4 according to bag (monitoring direction), the type identification (TYP) and its function of packet.In " pretreatment " process, work as acquisition
When TYP fields belong to control direction, the bag will be sent toward " control " process, will be this when TYP fields belong to monitoring direction
Bag is sent toward " monitoring " process.
The packet that " control " process receives comes from main website, and packet is further processed:The bag is parsed, obtains and
From the particular content of main website packet, the function of the packet is judged, then decide whether to call the information of substation.If the number
The configuration of reading substation, calling device fault history information of main website etc. is included according to bag content, then is transferred to " calling " process, by
" calling " process processes again;If the packet content is the protection information of calling device, fault oscillograph failure file etc.,
The bag is transferred to " processing module interface " process.
After " calling " process receives the information of " control " process, reading needs to call particular content, is sent out to " storage " process
Go out call instruction.After receiving from the content that " storage " progress feedback is returned, " processing mould after its encapsulation process, is then sent through
Block interface " process.
" monitoring " process receives information type has:It is the configuration/parameter information of sub-station device, normal operating condition information, different
These data, are divided into two major classes by normal warning information, fault message and fault related data in " monitoring " process:One kind is desirable
The information of main website, such as plant running status information, abnormality alarming information are sent on directly;Another kind is stored in inside substation,
Main website calling is waited to recall.After " monitoring " process receives packet, perform and judge order, the bag content is first if finding
Category information, then directly transmit toward " processing module interface ", if the bag content is the second category information, be saved in " storage process ".
" storage " process has a variety of storage modes to different data types, to adapt to " call " calling of process.When
The information received is the configuration/parameter information that protection device, fault oscillograph are sent, plant failure historical information, directly with original
Information mode stores;When receiving the recorder data from fault oscillograph, it is converted into and meets COMTRADE standards guiding text
Part (* .HRD), configuration file (* .CFG), the data file of data file (* .DAT) preserve again, complete to reinform master after preserving
Stand, " calling " process is then sent through after waiting main website calling.
" processing module interface " process connects processing module and message generation module.When there is packet to reach the process,
Transmission mechanism will be triggered, packet is sent to message generation module.
(2) message generation module
In 103 stipulations, it is specified that APDU message formats as shown in figure 5, by apply stipulations control information APCI and application
Service data unit ASDU two parts form, and APCI contains startup character, message length and the control domain of message, and ASDU is included
Data type, varistructure determiner, the transmission information such as reason and public address.It is first sharp when being modeled with OPNET to packet
APDU message formats, such as Fig. 6 are established with its own subsidiary bag Format Editor, then gives corresponding module to assign in process domain
Value.
The message generation module realizes following flow:
(21) when packet reaches message generation module, " initialization " process is triggered, stream is produced and interrupts, into packet
The label of message generation module is added, then packet is transferred to " parsing " process;After " parsing " process receives packet, logarithm
Progressively parsed according to bag, each several part content is judged;When reading packet content and application protocol control information
APCI (Application Protocol Control Information) is relevant, then is sent to " APCI " process;Remaining information
It is sent to " ASDU " process;The ASDU is Application Service Data Unit, Application service data unit;
(22) " ASDU " process is for further processing to receiving packet, reads letter relevant with ASDU in packet
Breath, then using OPNET functions toward ASDU units filling corresponding to content, formed ASDU packets, after the completion of be sent to again
" APCI " process;
(23) " APCI " process carries out processing to the packet received and forms APCI control domain packets, described
APCI is Application Protocol Control Information, application protocol control information;
(24) finally, APCI packets and ASDU packet combinings are formed complete APDU messages by " APCI " process, then
" send " process is sent to, the APDU messages of generation are sent by " send " process.
In the step (22), " ASDU " process is as follows to receiving the process that data are further handled:
" ASDU " process first creates ASDU packets, then sets variables A-H, represents the type mark of ASDU packets respectively
Know symbol, varistructure determiner, transmission reason, Application service data unit public address, function type, message sequence number, information
Element set and markers this 8 fields;Then above-mentioned 8 fields of ASDU packets are progressively extracted, often extract a data just
It is assigned to corresponding variable;Just fill and correspond to toward ASDU packets one by one after above-mentioned 8 fields of ASDU packets have been extracted
Content, when complete ASDU data filling after filled after ASDU packets be sent to " APCI " process again;
" APCI " process carries out the process that processing forms APCI packets to the packet received in the step (23)
It is as follows:
First, create and fill APCI control domain packets, process is:
(a) because the packet from " parsing " process is divided into three major types, as shown in Figure 7:Format transmission message type, compile
Number function for monitoring type, unnumbered control function class;Described information transformat type is designated as I format, the numbering
Function for monitoring type is designated as S forms, and the unnumbered control function class is designated as U forms;
" APCI " process receives the packet from " parsing " process, and the class of the packet is determined according to packet content
Type is I format, S forms or U forms, then creates and fill corresponding APCI control domains packet;
(a1) if the packet is I format, the APCI control domain packets of I format, the APCI control domain numbers are created
According to totally 4 byte-sized is wrapped, the first and second bytes is transmit Sequence Number, wherein the first bit of the first byte is fixed as the 0, the 3rd
It is Receiving Order row number with the 4th byte, wherein the first bit of the 3rd byte is fixed as 0, the information of remaining bit is then to need
To be filled according to the content for receiving packet;
(a2) if the packet is S forms, the APCI control domain packets of S forms, the APCI controls of S forms are created
Domain is equally 4 byte-sizeds, and the first bit of the first byte is 1, and remaining bit is 0, and all bits of the second byte are the 0, the 3rd
First bit of byte is 0, and remaining bit and nybble information then need to be filled according to the content for receiving packet;
(a3) if the packet is U forms, the APCI control domain packets of U forms, the APCI controls of U forms are created
Domain is equally 4 byte-sizeds, and the one or two bit of the first byte is 0, and remaining 6 bit is needed according to the packet content received
To fill, second to nybble all 0;
(b) APDU length is determined and obtains APCI packets:Because APCI packets include the startup word of 1 byte
Symbol, the APDU length of 2 bytes, the APCI control domains of 4 bytes, total size is 7 bytes;Therefore, " APCI " process, which receives, comes from
After the ASDU packets of " ASDU " process, parsing ASDU packets are first passed through, the ASDU data package sizes are obtained, due to APDU numbers
It is equal to APCI packets and ASDU packet sums according to the size of bag, and what the size of APCI packets was to determine, therefore determine
APDU length;The startup character of APCI packets is then filled with, it immobilizes as hexadecimal 68H;Then step
(a) result and APDU length pad complete the filling of APCI packets and obtain APCI numbers in APCI packets
According to bag.
According to the description of above method principle, this method implementation process is mainly reflected in prudential sub-station and uses five layers of communication protocols
Model is discussed to a series of processing procedures of external packet, 103 stipulations messages is ultimately formed and sends, implement flow
Under:
(1) physical layer of substation receives external data bag, and is converted into bit and streams to data link layer.
(2) bit stream received is packaged into data frame by data link layer, then being sent to Internet in the result of encapsulation.
(3) data frame received is converted into packet by Internet, and the mode such as passage path selection, combination is packet
It is sent to transport layer.
(4) transport layer carries out flow control, Error Control and sequence control using transmission service to packet, confirms data
The zero defect of bag, without lose, without after out of order again on be sent to application layer.
(5) after application layer receives packet, preliminary treatment is first done, then according to control direction and monitoring direction two ways
Packet is handled, then is sent to message generation module.
(6) message generation module receives packet, after the message of APDU forms is formed according to 103 stipulations, then message is returned
Send transport layer back to.
(7) hereafter packet reaches physical layer, thing against journey is above passed through after transport layer, Internet, data link layer
Reason layer is again sent 103 stipulations messages to external equipment in a manner of bit stream.
The implementation of the present invention is not limited to this, under the premise of the above-mentioned basic fundamental thought of the present invention, according to this area
Ordinary technical knowledge and customary means make the modification, replacement or change of other diversified forms to present invention, all fall within
Within rights protection scope of the present invention.