Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not paying the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The present invention is called " large-signal " with current value greater than the original signal of predetermined threshold value, and the original signal that current value is less than or equal to predetermined threshold value is called " small-signal ".For example: suppose in the electric system that the maximum protection electric current of part electric relay protection equipment secondary side is 100A, then can be in actual application with 1/20 of maximum protection electric current, promptly 5A is preset as threshold value.When the current value of the original signal of input CPU (CentralProcessing Unit, be called for short CPU) during greater than 5A, this original signal is large-signal; When the current value of the original signal of importing CPU was less than or equal to 5A, this original signal was small-signal.Need to prove that the maximum protection electric current that not is all electric relay protection equipment secondary sides is 100A, is merely example here and describes, and should not be construed as the restriction of technical spirit of the present invention.
The structural representation of the signal sampling device that Fig. 1 provides for one embodiment of the invention.As shown in Figure 1, the signal sampling device that present embodiment provides comprises: input interface module 1, CPU 2 and output interface module 3, input interface module 1 is connected with CPU 2 respectively with output interface module 3.
Wherein, input interface module 1 comprises first signal input circuit 11 and secondary signal input circuit 12.When signal sampling device was in running order, the input end of the input end of first signal input circuit 11 and secondary signal input circuit 12 was imported original signal respectively.Wherein, the output terminal of first signal input circuit 11 is to CPU 2 input original signals; Secondary signal input circuit 12 carries out processing and amplifying to the original signal of its input end input and obtains amplifying signal, exports amplifying signals through its output terminal to CPU 2.
CPU 2 is used to receive the original signal of first signal input circuit, 11 inputs and the amplifying signal of secondary signal input circuit 12 inputs, and original signal and amplifying signal that these two circuit are imported respectively carry out sampling processing respectively; The current value of judging original signal when CPU is during greater than predetermined threshold value, through the sampled result of output interface module 3 output original signals, otherwise, through the sampled result of output interface module 3 output amplifying signals.Concrete; CPU 2 judges that at first whether the current value of the original signal that first signal input circuit 11 is imported is greater than predetermined threshold value; If the current value of original signal is greater than predetermined threshold value; Explain that original signal is a large-signal, CPU 2 is through the sampled result of output interface module 3 output original signals.If the current value of original signal is less than or equal to predetermined threshold value, explain that original signal is a small-signal, CPU is confirmed the sampled result of amplifying signal more near actual value, through the sampled result of output interface module 3 output amplifying signals.
Output interface module 3 is used for to external unit, like the sampled result of electric relay protection equipment output original signal or the sampled result of amplifying signal, for external unit, moves according to sampled result like electric relay protection equipment.
Next it is following to improve the realization mechanism analysis of signal sampling precision in the range ability of broad to the present invention:
The present invention divides two-way input CPU with pending original signal, and one the tunnel is original signal, and another road is the amplifying signal of original signal.CPU judges that according to the current value of original signal original signal is large-signal or small-signal, and selects the sampled result of output original signal or the sampled result of amplifying signal according to judged result.
When the useful signal in the original signal was large-signal, the sampled result of the higher and original signal of signal to noise ratio (S/N ratio) and the sampled result of amplifying signal were basic identical.And original signal is not passed through processing and amplifying, and its value more approaches actual value, so the sampled result of CPU selection output original signal, helps guaranteeing the signals sampling precision.
When the useful signal in the original signal is small-signal; Signal to noise ratio (S/N ratio) is lower, and the sampled result degree of distortion of original signal is bigger, if the sampled result of CPU selection output this moment original signal; The external unit regular event be possibly influence, as electric relay protection equipment malfunction or tripping caused; And amplifying signal is the compensated input signal to original signal, thereby has improved signal to noise ratio (S/N ratio), and CPU selects the sampled result of output amplifying signal can improve sampling precision, helps the regular event of external unit such as electric relay protection equipment.Therefore; The present embodiment CPU is according to the strength of current of original signal; Select the sampled result of output original signal or amplifying signal, that is: select the sampled result of output original signal when original signal during for large-signal, when original signal is selected the sampled result of output amplifying signal during for small-signal; Thereby make signal sampling device in the range ability of broad, improved the precision of signal sampling like the scope of 0-100A.
Can know through above-mentioned analysis; The signal sampling device that present embodiment provides divides two-way with pending original signal; Promptly first signal input circuit and secondary signal input circuit get into CPU, and wherein the secondary signal input circuit carries out processing and amplifying to original signal.CPU is to the two-way input signal; Be that original signal and amplifying signal carry out sampling processing respectively; And, select the sampled result of output original signal or amplifying signal, thereby when original signal is large-signal or small-signal according to the intensity of original signal current value; Can both guarantee the authenticity of sampled signal preferably, promptly the range ability at broad has improved the signals sampling precision.
On the basis of technique scheme, optional, the secondary signal input circuit can comprise signal amplification circuit and clamping circuit.Signal amplification circuit is used to amplify the original signal of its input end input, and its output terminal is exported amplifying signal through clamping circuit to CPU.Clamping circuit is connected with the output terminal of signal amplification circuit, is used for the magnitude of voltage of signal amplification circuit to the amplifying signal of CPU output is limited in preset range.
The circuit diagram of the secondary signal input circuit that Fig. 2 provides for another embodiment of the present invention.In circuit diagram shown in Figure 2, signal amplification circuit is specially the positive amplifying circuit, and clamping circuit is specially diode clamping circuit.
Wherein, The positive amplifying circuit comprises operational amplifier 21; The normal phase input end input original signal of operational amplifier 21; Its inverting input is through the parallelly connected some ground connection (AGND) of first resistance 22 with second resistance 23, and its output terminal is connected with the CPU (not shown) through the parallelly connected point of second resistance 22 and the 3rd resistance 24 and through clamping circuit.In this positive amplifying circuit, the concrete model of operational amplifier can be selected according to actual needs, and the enlargement factor of the original signal of its input equals the resistance value ratio of second resistance 23 and first resistance 22.
Diode clamping circuit comprises two diodes of reverse parallel connection, i.e. first diode 25 of reverse parallel connection and second diode 26.The input end grounding of first diode 25, the output termination direct current high level AD_DC of second diode 26.At this diode clamping circuit; Can the output voltage of positive amplifying circuit be limited between the 0--AD_DC; For example: the voltage of supposing direct current high level AD_DC is 3V, and then diode clamping circuit is limited in 0-3V with the output voltage of positive amplifying circuit, and promptly the clamp voltage scope is: 0-3V.The benefit of so handling is, can be according to the clamp voltage scope of the load-bearing capacity design diode clamping circuit of CPU, and the load-bearing capacity of effectively avoiding output voltage because of the positive amplifying circuit to exceed CPU is damaged CPU.
The secondary signal input circuit that present embodiment provides through adjusting the resistance value ratio of first resistance and second resistance, can be controlled the enlargement ratio of original signal flexibly; Through the clamp voltage scope of adjustment diode clamping circuit, can effectively avoid the output voltage of positive amplifying circuit to exceed the load-bearing capacity of CPU, thereby protect CPU.It is thus clear that, the secondary signal input circuit that present embodiment provides to have a circuit structure simple, realize advantages such as convenient.
It will be appreciated by those skilled in the art that: in the technique scheme, the positive amplifying circuit is merely a kind of embodiment of signal amplification circuit, and diode clamping circuit is merely a kind of embodiment of clamping circuit; The amplifying circuit of other forms also may be used in the signal sampling device realizing the enlarging function of original signal like see-saw circuit; The clamping circuit of other forms also may be used on realizing in the signal sampling device function of restricting signal amplifying circuit output voltage; Repeat no more at this.
The process flow diagram of the signal sampling method that Fig. 3 provides for another embodiment of the present invention.The subject of implementation of present embodiment signal sampling method can be signal sampling device shown in Figure 1.Concrete, as shown in figures 1 and 3, the present embodiment signal sampling method comprises:
Step 31: respectively to first signal input circuit and secondary signal input circuit input original signal.
This step will treat that the original signal of sampling processing divides two-way input, promptly import original signal respectively to the input end of first signal input circuit and the output terminal of secondary signal input circuit respectively.
Step 32: first signal input circuit is imported original signal to CPU.
The output terminal of first signal input circuit is connected with CPU, to CPU input original signal.
Step 33: the secondary signal input circuit is imported amplifying signal to original signal through processing and amplifying and to CPU.
The concrete structure of secondary signal input circuit is unrestricted, as comprising signal amplification circuit and clamping circuit.Under this situation, this step is amplified the original signal that its input end is imported by signal amplification circuit, and its output terminal is exported amplifying signal through clamping circuit to said CPU; And clamping circuit is limited in preset range with the magnitude of voltage of signal amplification circuit to the amplifying signal of CPU output, thereby avoids the output voltage of signal amplification circuit to exceed the load-bearing capacity of CPU, helps protecting CPU.Optional, the secondary signal input circuit can adopt circuit structure as shown in Figure 2, and it realizes that original signal is amplified and the realization mechanism of the voltage clamp of amplifying signal, can repeat no more at this referring to the literature record of the corresponding embodiment of preceding text Fig. 2.
Above-mentioned steps 32 and step 33 do not have the restriction of sequential relationship, can carry out synchronously like step 32 and step 33 etc.
Step 34: CPU is carried out sampling processing respectively to original signal and amplifying signal.
This step is unrestricted to the signals sampling Processing Algorithm.Practical experience shows, if the current value of original signal greater than predetermined threshold value, promptly original signal is under the situation of large-signal, it is basic identical to adopt Same Way that original signal and amplifying signal are carried out the sampled result that sampling processing obtains; If the current value of original signal is less than or equal to predetermined threshold value, promptly original signal is under the situation of small-signal, adopts Same Way that original signal and amplifying signal are carried out the sampled result that sampling processing obtains and differs greatly.CPU is carried out sampling processing respectively to the original signal of first signal input circuit input and the amplifying signal of secondary signal input circuit input.
Step 35: CPU judges that whether the current value of the original signal that first signal input circuit is imported is greater than predetermined threshold value, if then execution in step 36; Otherwise, execution in step 37.
In the electric system, the maximum protection electric current of part electric relay protection equipment is 100A, can be in actual application with 1/20 of maximum protection electric current, and promptly 5A is preset as threshold value.CPU is confirmed the current value of the original signal of first signal input circuit input; And judge that whether this current value is greater than predetermined threshold value; As whether judge this current value, and select the sampled result of output original signal or the sampled result of output amplifying signal according to judged result greater than 5A.
Step 36: CPU is through the sampled result of output interface module output original signal, and output interface module is to the sampled result of external unit output original signal; Process ends.
If CPU is determined the current value of original signal greater than predetermined threshold value; Like the current value of original signal greater than 5A; Explain that then original signal is a large-signal; CPU with the original signal of first signal input circuit input as useful signal, through output interface module to external unit, like the sampled result of external power relay protection device output original signal.
Step 37: CPU is through the sampled result of output interface module output amplifying signal, and output interface module is to the sampled result of external unit output original signal; Process ends.
If determining the current value of original signal, CPU is less than or equal to predetermined threshold value; Current value like original signal is less than or equal to 5A; Explain that then original signal is a small-signal; CPU with the amplifying signal of secondary signal input circuit input as useful signal, through output interface module to external unit, like the sampled result of external power relay protection device output original signal.
The signal sampling method that present embodiment provides divides two-way with pending original signal, and promptly first signal input circuit and secondary signal input circuit get into CPU, and wherein the secondary signal input circuit carries out processing and amplifying to original signal.CPU is to the two-way input signal; Be that original signal and amplifying signal carry out sampling processing respectively; And, select the sampled result of output original signal or amplifying signal according to the intensity of original signal current value, that is: select the sampled result of output original signal during for large-signal when original signal; When original signal is selected the sampled result of output amplifying signal during for small-signal; Thereby guaranteed no matter original signal is large-signal or small-signal, can both guarantee the authenticity of sampled signal preferably, and promptly the range ability at broad has improved the signals sampling precision.
One of ordinary skill in the art will appreciate that: the above-mentioned flow process of present embodiment is merely the example of the sampling processing flow process of an original signal, in actual application, and can be through carrying out above-mentioned flow process repeatedly to realize the continuous sampling of signal.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be accomplished through the relevant hardware of programmed instruction; Aforesaid program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that previous embodiment is put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these are revised or replacement, do not make the spirit and the scope of the essence disengaging embodiment of the invention technical scheme of relevant art scheme.