Background technology
In current emulation technology, the control of the position of the switch is conventionally adopted to following several modes: the one, directly switching value data (0 or 1) assignment to switch position signal, in the time that position of the switch state need to change, need manual modification switching value data (0 or 1), the shortcoming of this method is to change online position of the switch state, the 2nd, the switching logic element gauge tap position signalling that adopts simulation software to provide, take PSCAD/EMTDC software as example, " Timed Breeaker Logic " element that this software provides can configuration switch initial position state and can set the online position of the switch state that changes of moment, the shortcoming of this method is that each " TimedBreeaker Logic " element can only be controlled the position of single switch, the change of switch initial position needs manually to arrange the parameter of " Timed Breeaker Logic " element, when in realistic model, number of switches is a lot, the change of switch initial position need to arrange one by one, workload is larger, the 3rd, at present a lot of simulation softwares all provide self-defined element funcall user function code, can adopt self-defining switch control program gauge tap location status, this kind of mode can be according to realistic model operating condition automatic control switch location status, but must revise switch control program when the switch initial position state of realistic model need to be changed.Do not have at present a kind of control method of the position of the switch can be in the original state of flexible gauge tap position on line real time control position of the switch state.
Summary of the invention
The object of this invention is to provide position of the switch control method in a kind of digital simulation model, can on line real time control position of the switch state in the original state of flexible gauge tap position.
The invention provides position of the switch control method in a kind of digital simulation model, the method that adopts switch original state element to match with switch control program is come gauge tap position; Switch original state element is the element with simulation software custom feature exploitation, it is input as system control model, be output as the initial position state of switch, according to the difference of system control model, the location status of each switch under every kind of control model of predefine, when the current control model of system changes, the position of the switch state of output changes automatically according to predefine state; By the original state of switch original state element gauge tap, the real-time status of switch in switch control program control model running process, switch original state element is output as switch initial position signal, switch control program element is output as switch ON-and OFF-command and switch closure command, the final position state of both output signals common determine switch after coordinating processing of circuit.
Further: described cooperation circuit specifically refers to that switch initial position signal opens through time delay the input end that element A, monostable trigger A connect "or" logic element A, the switch ON-and OFF-command of switch control program element output connects the input end of "or" logic element A through monostable trigger B, the output of "or" logic element A is connected to the set input of rest-set flip-flop; Switch initial position signal opens through " non-" logic element, time delay the input end that element B, monostable trigger C connect "or" logic element B, the switch closure command of switch control program output connects the input end of "or" logic element B through monostable trigger D, the output of "or" logic element B is connected to the RESET input of rest-set flip-flop; The output signal of rest-set flip-flop is final position of the switch status signal.
The invention has the beneficial effects as follows: the original state of gauge tap position flexibly not only compared with previous methods, can control in real time switch bit configuration state simultaneously.While change due to the current control model of model, the position of the switch state of output changes automatically according to predefine state, and do not need to revise realistic model, and be convenient to adopt in the emulation that variable carries out at the system control model take model multiple running technology, improve simulation efficiency.
Embodiment
The present invention is achieved by the following technical solutions: the method that adopts switch original state element to match with switch control program is carried out gauge tap state.Switch original state element is the element with simulation software custom feature exploitation, it is input as system control model, be output as the location status of switch, according to the difference of control model, the location status of each switch under every kind of control model of predefine, its essence is a predefined on off state matrix, when the current control model of model changes, the position of the switch state of output changes automatically according to predefine state.Switch control program element is that it is output as switch folding order by simulation software self-defined element funcall subscriber switch control program function code.By the original state of switch original state element gauge tap, by the real-time status in switch control program element control model running process, the final position state of common determine switch after the cooperation processing of circuit that both output signals are opened element, monostable trigger, "or" logic element, rest-set flip-flop formation through " non-" logic element, time delay.
The annexation of the each ingredient of this programme is as described below: switch original state element is output as switch initial position signal, and switch control program element is output as switch ON-and OFF-command and switch closure command; Switch initial position signal opens through time delay the input end that element A, monostable trigger A connect "or" logic element A, the switch ON-and OFF-command of switch control program element output connects the input end of "or" logic element A through monostable trigger B, the output of "or" logic element A is connected to the set input of rest-set flip-flop; Switch initial position signal opens through " non-" logic element, time delay the input end that element B, monostable trigger C connect "or" logic element B, the switch closure command of switch control program output connects the input end of "or" logic element B through monostable trigger D, the output of "or" logic element B is connected to the RESET input of rest-set flip-flop; The output signal of rest-set flip-flop is final position of the switch status signal.
Below in conjunction with accompanying drawing, embodiment is described:
The object of this specific embodiment is straight-flow system realistic model, the mode of connection that system control model is model, and the software of use is PSCAD/EMTDC software.
As shown in Figure 1, switch original state element be input as system control model, be output as switch initial position signal, switch control program element is output as switch ON-and OFF-command and switch closure command, and both output signals are the common final position of the switch state that determines after coordinating processing of circuit.
Switch original state element is the element with simulation software custom feature exploitation, in the present embodiment, it is input as the mode of connection of model, be output as the location status of switch, according to the difference of the model mode of connection, the location status of each switch under every kind of mode of connection of predefine.As shown in Figure 2, the mode of connection of the switch original state element in the present embodiment has 3 kinds, needs the switch bit of controlling to be equipped with 5, the corresponding one group of on off state of each mode of connection (0/1,0/1,0/1,0/1,0/1); One group of on off state of the mode of connection 1 correspondence is preset as to (0,0,1,0,1), and one group of on off state of the mode of connection 2 correspondences is preset as (1,1,1,1,1), and one group of on off state of the mode of connection 3 correspondences is preset as (1,0,1,0,1); After selected certain mode of connection, export corresponding one group of on off state.
Switch control program element is by simulation software self-defined element funcall subscriber switch control program function code, and it is output as switch folding order.Switch control program, according to disconnection or the close commands of the current ruuning situation output switch of straight-flow system, is split to close and is controlled in real time in straight-flow system realistic model operational process.
By the original state of switch original state element gauge tap, by the real-time status in switch control program element control model running process, the final position state of common determine switch after the cooperation processing of circuit that both output signals are opened element, monostable trigger, "or" logic element, rest-set flip-flop composition through " non-" logic element, time delay.
Switch original state element is output as switch initial position signal (0 represents closure state, and 1 represents open mode), and switch control program element is output as switch ON-and OFF-command and switch closure command.As shown in Figure 3, switch initial position signal opens through time delay the input end that element A, monostable trigger A connect "or" logic element A, the switch ON-and OFF-command of switch control program element output connects the input end of "or" logic element A through monostable trigger B, the output of "or" logic element A is connected to the set input of rest-set flip-flop; Switch initial position signal opens through " non-" logic element, time delay the input end that element B, monostable trigger C connect "or" logic element B, the switch closure command of switch control program output connects the input end of "or" logic element B through monostable trigger D, the output of "or" logic element B is connected to the RESET input of rest-set flip-flop; The output signal of rest-set flip-flop is final position of the switch status signal (0 represents closure state, and 1 represents open mode).The delay time that in embodiment, element is opened in time delay is all made as 10ms, and the pulse width of monostable trigger is all made as 2ms.