Logic computing method for the trigger-type of electric substation automation system
Technical field
The invention belongs to Substation Automation System field, specifically to a kind of touching for electric substation automation system
Hairdo logic computing method.
Background technology
, it is necessary to carry out logical calculated to the data that collection comes up in electric substation automation system, result of calculation produces one
A little new data, serve some senior applications or meet some demands.Logical calculated (with or, non-, XOR etc.), for will
One or more signals synthesize a signal according to specified logical operation mode.
Usual way in current electric substation automation system be by the calculation of timing scan real-time data base come
Realize.Logical calculated module accesses real-time data base, obtains the value for the one or more signals for participating in computing, then these values are pressed
A new value is calculated according to specified computing mode.
The mode of this timing scan real-time data base, it is impossible to tackle fast-changing signal.With the automation of transformation substations
The development of technology, the signal of some devices is driven to accomplish that involution often only needs 20 to 30 milliseconds.If the cycle of timing scan sets
It is fixed it is too low if, system load can be very high;If the comparison set is high, it is possible to can catch less than these rapid changes
Signal.
The timescale requirements that signal occurs some result of calculations are stricter, such as when acting, it is desirable to arrived using first
The markers of the signal reached, and during involution, it is desirable to use the markers of last signal reached.The mode of timing scan is can not
Target when catching these.
The content of the invention
To solve deficiency of the prior art, the present invention provides a kind of logic computing method of trigger-type, and the purpose is to height
Effect promptly handles logical calculated, prevents the generation of dropout problem, and target when keeping markers and the source of result of calculation
Uniformity.
In order to realize above-mentioned target, the present invention is adopted the following technical scheme that:Trigger-type for electric substation automation system
Logic computing method, it is characterised in that including step:
1) variable signal is issued, and by the variable signal produced in variable signal release unit collection system, and encloses letter
Number occur markers, be published on the messaging bus of system;
2) variable signal is subscribed to, and variable signal is subscribed to from the messaging bus of system by variable signal subscriber units, is received
To after variable signal, the variable in logical calculated formula is screened to signal, abandons unwanted signal, it would be desirable to
Signal is stored in pending signal queue;
3) logical calculated of trigger-type, takes out signal, in logic by logic computing unit from pending signal queue
Searched, if the variable in logical calculated formula includes this signal, the logical calculated formula is entered in calculation formula
Row logical calculated;The markers of result of calculation uses the markers that this signal occurs, and result of calculation is finally sent to the message of system
In bus.
It is previously described for the logic computing method of the trigger-type of electric substation automation system, it is characterised in that:The change
Signal is the change remote signalling, change remote measurement, SOE signals sent on device.
It is previously described for the logic computing method of the trigger-type of electric substation automation system, it is characterised in that:The basis
Variable in logical calculated formula is screened to signal, is the logic meter that logical calculated formula whether is take part according to the signal
Calculate, be stored in if logical calculated formula includes this signal variable in pending signal queue, otherwise abandon this signal.
The beneficial effect that the present invention is reached:The present invention triggers logical calculated by variable signal, improves system resource
Utilization rate, reduce system load, and effectively improve running efficiency of system;Result of calculation uses the markers of source signal, can
Target rigors during meeting user to result of calculation;For fast-changing signal, change is stored in during due to variable signal
Change in signal queue, so will not lossing signal;It is according to the suitable of first in first out when taking variable signal in variable signal queue
Sequence carries out taking variable signal, and only carries out processing calculating to a variable signal every time, so not resulting in result of calculation
The entanglement of order.
Brief description of the drawings
Fig. 1 is the flow chart of the logic computing method of the trigger-type for electric substation automation system.
Embodiment
The invention will be further described below in conjunction with the accompanying drawings.Following examples are only used for clearly illustrating the present invention
Technical scheme, and can not be limited the scope of the invention with this.
Fig. 1 is the flow chart of the logic computing method of the trigger-type for electric substation automation system.Transformer station is automatic
The flow of process signal is divided into signal publisher and signal subscriber in change system, is connected by messaging bus between them
Come.Publisher collects the variable signal in electric substation automation system, and these signals are published on the messaging bus of system;
Subscriber is received after signal, is screened, and is put into signal to be processed is needed in pending signal queue;Logic computing unit from
Obtained in queue after signal, carry out logical calculated, and result of calculation is published on the messaging bus of system.
Specific method is as follows:
For the logic computing method of the trigger-type of electric substation automation system, implementation step is as follows:
1) variable signal is issued, and by the variable signal produced in variable signal release unit collection system, and encloses letter
Number occur markers, be published on the messaging bus of system;
2) variable signal is subscribed to, and variable signal is subscribed to from the messaging bus of system by variable signal subscriber units, is received
To after variable signal, the variable in logical calculated formula is screened to signal, abandons unwanted signal, it would be desirable to
Signal is stored in pending signal queue;
3) logical calculated of trigger-type, takes out signal, in logic by logic computing unit from pending signal queue
Searched, if the variable in logical calculated formula includes this signal, the logical calculated formula is entered in calculation formula
Row logical calculated;The markers of result of calculation uses the markers that this signal occurs, and result of calculation is finally sent to the message of system
In bus.
The variable signal is the change remote signalling, change remote measurement, SOE signals sent on device.
Variable in the formula according to logical calculated is screened to signal, is that whether take part in logic according to the signal
The logical calculated of calculation formula, is stored in pending signal queue if logical calculated formula includes this signal variable, no
Then abandon this signal.
For example it is bright below, there are n bar logical calculated formula in system, it is as follows:
OUT1=in11 | | in12 | | in13;
OUT2=in21&&in22&&in23;
OUT3=in31 | | in32 | | in33 | | in34 | | in35;
OUT4=!in41;
OUT5=in51&&in52&&in53&&in54;
OUTn=inn1 | | inn2 | | inn3 | | inn4
It is the logical calculated formula in electric substation automation system above, wherein OUT1 is in11 and in12 and in13 tri-
Signal or the result of calculation of computing, OUT2 are the result of calculation of tri- signals of in21 and in22 and in23 and computing, and OUT3 is
Five signals of in31, in32, in33, in34, in35 or the result of calculation of computing, OUT4 are the calculating that mono- signal of in41 is negated
As a result, OUT5 is the result of calculation of tetra- signals of in51, in52, in53 and in54 and computing, remaining logical calculated formula with
This analogizes.
Logic computing unit inquires about pending signal queue incessantly, if variable signal, is taken out in queue,
Logical calculated is carried out, is exemplified below, it is assumed that current all input signals are all 0:
Embodiment 1
In11 signals are changed into 1 from 0;
Release unit transmits the signal into subscriber units;
Subscriber units are retrieved, it is found that the signal take part in logical calculated, the signal is put into pending signal queue
In;
Logic computing unit is got after the signal, and retrieval needs the logical formula calculated, and OUT1 is found after retrieval
This formula is needed to be calculated, and to OUT1, this formula is calculated, and OUT1 value is changed into 1 from 0.
Embodiment 2
If the two signals of In21 and in22 are successively changed into 1 from 0;
The two signals are sent to subscriber units by release unit;
Subscriber units are retrieved, it is found that the two signals have been involved in logical calculated, the two signals are put into and wait to locate
Manage in signal queue;
Logic computing unit gets this signal of in21 first, and retrieval needs the logical formula calculated.After retrieval
It was found that this formula of OUT2 needs to be calculated, to OUT2, this formula is calculated, and OUT2 value remains as 0;
Logic computing unit then gets this signal of in22, and retrieval needs the logical formula calculated.After retrieval
It was found that this formula of OUT2 needs to be calculated, to OUT2, this formula is calculated, and OUT2 value remains as 0.
Embodiment 3
Then embodiment 2, In23 signals are changed into 1 from 0;
Release unit transmits the signal into subscriber units;
Subscriber units are retrieved, it is found that the signal take part in logical calculated, the signal is put into pending signal queue
In;
Logic computing unit is got after the signal, and retrieval needs the logical formula calculated.OUT2 is found after retrieval
This formula is needed to be calculated, and to OUT2, this formula is calculated, and now OUT2 value is changed into 1 from 0.
By that analogy.
Due to using this trigger mechanism, logic computing unit only needs to calculate the logical calculated that correlated variables changes
Formula, and without calculating whole logical calculated formula as scan mode, and only a variable signal is carried out every time
Processing is calculated, so the markers of result can easily use the markers of the variable signal, meets substation field and signal is sent out
The requirement of raw sequential.For fast-changing signal, because variable signal is stored in variable signal queue, so will not lose
Inactivating signal;It is to carry out taking variable signal according to the order of first in first out when taking variable signal in variable signal queue, and
Processing calculating only is carried out to a variable signal every time, so not resulting in the entanglement of result of calculation order.In high-volume data
The logical calculated formula that correlated variables changes is calculated due to only needing to when being calculated, so system can be made full use of to provide
Source, and effectively improve running efficiency of system.
Described above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, without departing from the technical principles of the invention, some improvement and deformation can also be made, these improve and deformed
Also it should be regarded as protection scope of the present invention.