Telemechanical channel automatic switching method
Technical field
The present invention relates to telemechanical channel automatic switching method.
Background technology
Electric power system is that a Regional Distribution is vast, the unified scheduling of being made up of power plant, transformer station, transmission and distribution networks and user and the complex large system of operation.Manage and monitor the numerous factories, the institute that are widely distributed, stand and the operating condition of equipment, components and parts, just must be by means of Operation Technique of Electric Systems.Operation of Electric Systems is made up of telemechanical apparatus (RTU) and telecontrol channel, and its function is the real time information transmission that realizes between control centre and power plant, transformer station.The RTU device is gathered the operating condition information of power plant, place, transformer station and is uploaded to the control centre, operations staff and computer system by the control centre, current system running state is carried out analytical calculation, result of calculation and decision-making order are delivered to RTU by the down going channel of telemechanical, drive corresponding controlled device by RTU again.
In order to guarantee the reliable transmission of movable information, the general two telecontrol channels of employing that require in Operation of Electric Systems.Two passages are standby each other, and when a passage broke down, telecontrol information can be from the another one channel transfer.Factory's station end in electric power system has a channel switching device, and this device connects two telecontrol channels simultaneously.For downlink data, this device only selects the data of a passage to give corresponding RTU device simultaneously, and does not receive the data of another passage; When the passage of working broke down, device can automatically switch to another passage and export downlink data and give RTU, stops simultaneously receiving data from previous passage.
Such switching device shifter need carry out passage automatically according to the data mode of two down going channels and switch, so the foundation of passage switching is exactly Data Detection and differentiation to two down going channels.Existing solution is:
1) Data Detection: detect the variation (digital signal during analog channel after the detection demodulation) that has or not " 1 ", level "0" in the down going channel.If level is " 1 " then think that passage does not have data for a long time; If level is " 0 ", think that then passage has data.
2) passage switches: if the work at present passage has data, device is locked in this passage always.If, install between two passages, to switch back and forth 10 times by certain time interval (being generally 10s) when prepass does not have data.During this period, no matter which routing restoration data, device all can lock and is operated in this passage.If switching after 10 times, two passages still all do not have data, and the time interval of then switching 1 time extends to 30 minutes voluntarily.
3) data internal transmission: at the receiving terminal of passage, the data behind the use over-sampling (as 8 times) are sent into the reception of RTU then as the input of equipment, use identical speed reduction as output equally.
The shortcoming of prior art is as follows:
1) Data Detection and the differentiation for passage is unique foundation that channel switching device switches, and in the existing Data Detection scheme, too simple for the judgement that channel data has or not.Signal level in the passage may be caused by two reasons for " 0 ": one is to have effective downlink data in the passage really, and another is to have interference signal in the passage.When owing to disturbing the signal level cause passage during for " 0 ", existing Data Detection scheme can not be judged him and disturb, still can be wrong think effective downlink data.The switching that the judgement of this mistake just might cause device to make a mistake.
When 2) adopting the Poling transmission means, the passage switch logic of existing scheme is too big problem not.Yet when adopting the CDT host-host protocol, the time interval of twice downlink data can be long (time interval of ordering during descending school is generally all more than 5 minutes), and the message duration each time has only several seconds.Data cases on the down going channel is like this: a very long time does not have data, and the data of very short time are arranged then, so repeatedly circulation.In this case, device does not switch the time interval less than twice downlink data time of being spent for 10 times back and forth when passage has data, extends to 30 minutes switching the time interval that can be about to switch 1 time after 10 times certainly.If device locked just and was operated on the out of order passage this moment, owing to do not switch in 30 minutes, so corresponding RTU device can not receive downlink data in 30 minutes.Although the another one passage does not have fault and can the normal transmission data like this, also can cause a large amount of downlink datas to lose.
3) the data internal transmission is subjected to the influence of sample rate f s.The sample rate height, can reduce the long distortion in code element position (distortion is 1/fs), reduce the transmission delay (transmission delay of increase is similarly 1/fs) of system simultaneously, but too high sampling rate can require to use arithmetic unit at a high speed, increase cost, reduce the EMC interference free performance of product simultaneously; Cross low sampling rate and increase code element distortion and transmission delay.
Summary of the invention
The purpose of this invention is to provide accuracy, the validity that can improve telemechanical down going channel Data Detection, judge faulty channel as soon as possible,, and do not increase the moving conduit automatic switching method of system delay and code element distortion with losing of minimizing downlink data.
The step of a kind of telemechanical channel automatic switching method of the present invention is as follows:
Register circuit receives the digital signal of two telecontrol channels and it is temporarily stored in the data storage, simultaneously the data that receive is detected, analyzes, judges;
If data exist error messages such as overflow error, Frame mistake, parity error will provide corresponding prompt;
CPU regularly inquires about the data memory FIFO of register circuit;
Data are arranged and without any error message in the data storage if inquire, then Cun Chu channel data is effective downlink data, the telecontrol channel automatic switching control equipment locks or switches to this passage, if wrong information then think interference signal, the cross matrix of CPU notice telecontrol channel automatic switching control equipment connects, switches to another passage on physical link.
Described the data that receive being detected, is to detect the variation that passage has or not " 1 ", level "0", if level is " 1 " then passage does not have data for a long time; If level is " 0 ", then passage has data.
Another kind of telemechanical channel automatic switching method of the present invention comprises the steps:
Detect the downlink data of two telecontrol channels simultaneously;
In a period of time, if two telecontrol channels all have data or all do not have data, then two passages all do not have fault, passage automatic switching control equipment regular event;
If two one of telecontrol channels have one of data not have data, then there is a telecontrol channel to have fault, analyze, judge the data message of the telecontrol channel that data are arranged in the data storage that is stored in register circuit;
If data exist error messages such as overflow error, Frame mistake, parity error will provide corresponding prompt;
CPU regularly inquires about the data memory FIFO of register circuit;
Data are arranged and without any error message in the data memory FIFO if inquire, it then is effective downlink data, telecontrol channel automatic switching control equipment locking or switch to this passage, if wrong information then think interference signal, the telecontrol channel automatic switching control equipment switches to another passage.
Described a period of time is T1 blanking time of twice downlink data, if time T 1 is less than then thinking question and answer mode telemechanical stipulations mode 10 seconds, if one of two passages has one of data not have data, then the telecontrol channel automatic switching control equipment automatically switches to the passage of data;
If time T 1 is greater than then thinking circulating telemechanical stipulations mode in 2 minutes, when circulating telemechanical stipulations mode, to dynamically generate a time T 2, this time T 2 is more bigger again much smaller than 30 minutes than T1, if when prepass does not have data and locked the T2 time at current passage, and another passage has data, and then telecontrol channel automatically switches to the passage of data.
Described when circulating telemechanical stipulations mode, dynamically generate a time T 2 and be meant that T1 added for 60 seconds.
Telemechanical channel automatic switching method of the present invention can improve the validity of Data Detection, for switching, device provides foundation accurately, and can judge faulty channel fast, reducing losing of downlink data as far as possible, and not introduce new code element distortion and transmission delay.
Channel failure discriminating processing method to a period of time of the present invention can compatible CDT and Poling transmission means and need not in advance device to be carried out any setting, can either promptly and accurately judge faulty channel simultaneously, can reduce loss of data again.
Description of drawings
Fig. 1 is the operation principle block diagram of the telecontrol channel automatic switching control equipment of the embodiment of the invention one;
Fig. 2 is the flow chart of embodiments of the invention one;
Fig. 3 is the flow chart of embodiments of the invention four;
Fig. 4 is that channel failure is differentiated flow chart.
Embodiment
Operation of Electric Systems:Remote monitoring, control technology for the power system dispatching service.It converts the operating condition (comprising the operational factor of on off state, equipment etc.) of each power plant, electric substation, transformer station to be convenient to transmit signal form, is sent to control centre (main website) by special information channel, monitors usefulness for the dispatcher; Some control commands of dispatcher also can be sent to distant place factory, institute, stand by similar procedure simultaneously, drive controlled device.
Telecontrol information:Refer to the various instructions that tele-control master station is issued RTU, and the general name of giving all information of main website on the RTU.
Telecontrol channel:The path of telecontrol information transmission.The data of giving main website on the RTU are called upstream data, and its information transmission path is called data feedback channel; The data that tele-control master station is issued RTU are called downlink data, and its information transmission path is called down going channel.
RTU:Terminal unit claims remote terminal unit again.Be mounted in a kind of automation equipment of power plant, transformer station with four remote moving functions.It is responsible for gathering, monitor and transmit the operating condition of power plant, place or transformer station to the control centre that the control and the dispatching command of power plant, place or transformer station mail at the operation dispatching center simultaneously.
CDT:Circulating telemechanical stipulations.Be that the substation active cycle is uploaded various information, main website issues data at random according to concrete needs.On telecontrol channel, upstream data can be arranged always, and downlink data be at random, uncertain.
Poling:Question and answer mode telemechanical stipulations.Be inquiry or the operational order that main website sends an active, remote terminal unit equipment is answered passive information or response, and question-response constitutes a complete transmission course thus.On telecontrol channel, have up, downlink data transmission always.
When detecting passage and not having downlink data, may be that the control centre does not send data really, also may be there has been fault in passage.When detecting passage downlink data arranged, may be that the control centre is issuing data really, also may be to have interference signal in the passage.This shows,,, need resolve following two problems for the passage that carries out that can be correct switches for channel switching device based on discriminating data: the one, correctly detecting passage has free of data, and the 2nd, accurately judging passage has fault-free.
For the detection of data, we not only will detect the variation that passage has or not " 1 ", level "0", and whether also will judge data correct.The telecontrol channel automatic switching control equipment comprises register circuit, cross matrix and CPU as shown in Figure 1;
The register circuit receiving digital signals also is temporarily stored in it in data storage (fifo fifo memory) of register circuit, and is used for the data of storage are analyzed, judged;
Cross matrix is used to realize the switching and the exchanges data of channel signal, can adopt cross chips or software programming to realize that passage switches;
CPU, SPI interface by register circuit is communicated by letter with register circuit, the data mode that is used on the sense channel is also analyzed, is judged whether passage exists fault, be used to notify cross matrix on physical link, to disconnect or connect corresponding passage, the CPU of present embodiment adopts single-chip microcomputer, can certainly adopt ARM chip or microcontroller or microprocessor.
Embodiment one:
It is that device will carry out the basic reason that passage switches that passage breaks down, yet it is unscientific only carrying out the foundation that passage switches with the variation of level, because the variation of level also might be caused by interference signal, so the flow chart of the method for a kind of telecontrol channel automatic switchover of the present invention is as shown in Figure 2, and step is as follows:
The digital signal of register circuit receive path also is temporarily stored in it in data storage, simultaneously the data that receive are detected, analyze, judge, detect passage and have or not the variation of " 1 ", level "0", if level is " 1 " then passage does not have data for a long time; If level is " 0 ", then passage has data;
If data exist error messages such as overflow error, Frame mistake, parity error will provide the corresponding error sign by analysis;
CPU regularly inquires about the data memory FIFO of register circuit;
Data are arranged and without any error message in the data memory FIFO if inquire, then Cun Chu channel data is effective downlink data, the telecontrol channel automatic switching control equipment locks or switches to this passage, if wrong information then think interference signal, the cross matrix of CPU notice telecontrol channel automatic switching control equipment is connected to another passage on physical link.
Embodiment two:
In order further to improve the validity of Data Detection, provide accurate data for device switches as far as possible, judge faulty channel fast, reduce losing of downlink data, the flow chart of a kind of telemechanical channel automatic switching method of the present invention as shown in Figure 3, step is as follows:
Detect the downlink data of two telecontrol channels simultaneously;
In a period of time, if two telecontrol channels all have data or all do not have data, then two passages all do not have fault, passage automatic switching control equipment regular event;
If two one of telecontrol channels have one of data not have data, then there is a telecontrol channel to have fault, analyze, judge the data message of the telecontrol channel that data are arranged in the data storage that is stored in register circuit;
If data exist error messages such as overflow error, Frame mistake, parity error will provide the corresponding error sign by analysis;
CPU regularly inquires about the data memory FIFO of register circuit;
Data are arranged and without any error message in the data memory FIFO if inquire, it then is effective downlink data, telecontrol channel automatic switching control equipment locking or switch to this passage, if wrong information then think interference signal, the telecontrol channel automatic switching control equipment switches to another passage.
Above-mentioned a period of time is T1 blanking time of twice downlink data, concrete differentiation flow process as shown in Figure 4, if time T 1 is less than then thinking the Poling mode 10 seconds, if one of two passages has one of data not have data, then the telecontrol channel automatic switching control equipment automatically switches to the passage of data;
If time T 1 is greater than then thinking the CDT mode in 2 minutes, when the CDT mode, T1 is added time T 2 of dynamic generation in 60 seconds, this time T 2 is more bigger again much smaller than 30 minutes than T1, if when prepass does not have data and locked the T2 time at current passage, and another passage has data, and then telecontrol channel automatically switches to the passage of data.