CN106018957A - Hardware frequency measurement and frequency tracking method suitable for feed line terminal device - Google Patents
Hardware frequency measurement and frequency tracking method suitable for feed line terminal device Download PDFInfo
- Publication number
- CN106018957A CN106018957A CN201610331521.4A CN201610331521A CN106018957A CN 106018957 A CN106018957 A CN 106018957A CN 201610331521 A CN201610331521 A CN 201610331521A CN 106018957 A CN106018957 A CN 106018957A
- Authority
- CN
- China
- Prior art keywords
- frequency
- hardware
- voltage
- frequency measurement
- cpu
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R23/00—Arrangements for measuring frequencies; Arrangements for analysing frequency spectra
- G01R23/02—Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage
- G01R23/10—Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage by converting frequency into a train of pulses, which are then counted, i.e. converting the signal into a square wave
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Measuring Frequencies, Analyzing Spectra (AREA)
Abstract
The invention provides a hardware frequency measurement and frequency tracking method suitable for a feed line terminal device. The method includes calculating real time frequency of a feed line circuit by adopting a hardware circuit for collecting voltage of the feed line circuit, performing voltage following and square wave treatment, using a GPIO rising edge of a device CPU for triggering interruption and using a Timer0 timer in the CPU for timing. Hardware frequency measurement is small in CPU load occupancy, high in precision and the error range is as small as -0.02 Hz to 0.02 Hz. By adopting the Timer0 timer in the CPU for triggering an in-chip ADC for collecting voltage and current of the feed line circuit, timing period of the Timer0 timer can be changed through frequency measured by hardware in real time, whole cyclic wave collection can be realized, and each cyclic wave collects determined analog quantity points, so that frequency tracking is achieved. Therefore, accuracy of current and voltage sampling code values is improved, correctness of current and voltage valid values is ensured and feed line device precision and performance are improved.
Description
Technical field
The invention belongs to distribution, feed or generation monitoring, protection field, be specifically related to a kind of suitable
Hardware frequency measurement and frequency tracking method for feeder terminal unit.
Background technology
China's transmission line of electricity uses power frequency 50Hz frequency transmission electric energy.Along with the development of power system,
The factor affecting transmission line of electricity frequency characteristic gets more and more, and causes circuit overfrequency, the reason of under-frequency is more come
The most complicated, the frequency regulation of such as power shortage, rotator inertia and load all may have influence on transmission of electricity
The frequency of circuit.And under the state that system is operated in overfrequency or under-frequency, system loss can be increased, send out,
Supply, power consumption efficiency declines, it is possible to can damage system equipment.Along with the development of electronic technology, use
Feeder terminal unit is monitored the frequency of feeder line in real time and is greatly developed, and most products use
The mode of frequency measurement, the frequency of monitoring power network line, this method is computationally intensive, to the CPU of device
Bring substantial amounts of calculated load, and precision is inadequate.Feeder terminal unit can to the voltage of feeder line,
The parameters such as electric current are sampled, according to relevant standard, and 64 points of sampling of each sampling period, as
Really circuit is the 50Hz of standard, then the time used by each cycle is 1000/50=20ms, then
The sampling interval of 64 sampled points is 20/64=0.3125ms, but if the frequency of circuit there occurs
Changing, frequency becomes big or diminishes, and if sampling interval duration does not adjusts, can cause feeder line eventually
There is bigger error in electric current that end device calculates, voltage, the parameter such as meritorious, idle.So
Need the change according to feeder line frequency, change the time in sampling interval in real time, carry out frequency-tracking.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of hardware being applicable to feeder terminal unit and surveys
Frequency and frequency tracking method, overcome drawbacks described above, solves the problems referred to above.
It is an object of the invention to provide a kind of hardware frequency measurement being applicable to feeder terminal unit and frequency with
Track method.
For solving above-mentioned technical problem, the present invention provides a kind of hardware being applicable to feeder terminal unit to survey
Frequency and frequency tracking method, including:
The voltage of feeder line is gathered by voltage transformer,
Use hardware frequency measurement circuit that the voltage sine wave signal of described feeder line is adjusted to same frequency
Square-wave signal,
By square-wave signal described in the rising edge interrupt trap of the GPIO pin of CPU,
Calculate square-wave cycle by Timer0 intervalometer, draw real-time feeder line frequency,
By changing the timing of the intervalometer Timer1 within described CPU, change each cycle
Trigger ADC sampling number, it is achieved whole wave is sampled.
As a kind of hardware frequency measurement being applicable to feeder terminal unit of the present invention and frequency-tracking side
A kind of preferred version of method, described hardware frequency measurement circuit includes voltage follower circuit and squared circuit.
As a kind of hardware frequency measurement being applicable to feeder terminal unit of the present invention and frequency-tracking side
A kind of preferred version of method, described by Timer0 intervalometer calculating square-wave cycle, draw real-time
Feeder line frequency is particularly as follows: sample clock generator Timer0 records the time of twice GPIO pin interruption
Interval, calculates real-time feeder line frequency.
As a kind of hardware frequency measurement being applicable to feeder terminal unit of the present invention and frequency-tracking side
A kind of preferred version of method, the timing of the described intervalometer Timer1 by changing within described CPU
Time, change each cycle and trigger ADC sampling number, it is achieved whole wave sampling is particularly as follows: sampling is interior
Portion intervalometer Timer1 triggers ADC sampling, by the real-time frequency of feeder line, changes Timer1
Timing, it is achieved real-time frequency follow the tracks of.
Compared with prior art, a kind of hardware frequency measurement being applicable to feeder terminal unit that the present invention proposes
And frequency tracking method, by hardware voltage follow circuit, squared circuit, signal is processed,
Obtain square-wave signal, monitored by the GPIO pin of CPU in the rising edge of square-wave signal, and entrance
Disconnected, by reading the timing time of intervalometer Timer0 in interruption, obtain the frequency of feeder line,
Realize hardware frequency measurement.It is few that hardware frequency measurement takies cpu load, and precision is high, and error is less than ± 0.02Hz.
When the frequency of feeder line changes, carry out frequency-tracking, it is ensured that feeder means is carried out entirely
Cycle is sampled, even if each cycle period is different, it is also possible to ensure that each cycle samples 64
Point.Thus improve electric current, the accuracy of voltage sample code value, it is ensured that electric current, voltage effective value
Correctness, it is ensured that the accuracy of power calculation, improve the precision of feeder means, performance.
Accompanying drawing explanation
In order to be illustrated more clearly that the technical scheme of the embodiment of the present invention, in embodiment being described below
The required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only
Some embodiments of the present invention, for those of ordinary skill in the art, are not paying creative labor
On the premise of dynamic property, it is also possible to obtain other accompanying drawing according to these accompanying drawings.Wherein,
Fig. 1 is a kind of hardware frequency measurement being applicable to feeder terminal unit and the frequency tracking method of the present invention
System schematic;
-Fig. 2 is a kind of hardware frequency measurement being applicable to feeder terminal unit and the frequency-tracking side of the present invention
The sine wave of method is converted to the schematic diagram of square wave;
Fig. 3 is a kind of hardware frequency measurement being applicable to feeder terminal unit and the frequency tracking method of the present invention
Voltage follower circuit schematic diagram;
Fig. 4 is a kind of hardware frequency measurement being applicable to feeder terminal unit and the frequency tracking method of the present invention
Squared circuit theory diagrams.
Detailed description of the invention
A kind of hardware frequency measurement being applicable to feeder terminal unit of the present invention and frequency tracking method,
Use hardware frequency measurement scheme, by voltage follower circuit, squared circuit, line voltage distribution is accessed feedback
The GPIO pin of line terminal, GPIO pin is triggered by the rising edge of voltage square wave signal and interrupts,
GPIO pin calculates the intervalometer Timer0 time used in twice interruption in interrupting, draw each
The cycle of cycle, thus calculate the frequency of feeder line.According to frequency calculate each sampled point time
Between be spaced, thus carry out frequency-tracking.
Understandable, below in conjunction with tool for enabling the above-mentioned purpose of the present invention, feature and advantage to become apparent from
The present invention is further detailed explanation for body embodiment.
First, " embodiment " or " embodiment " referred to herein refers to may be included in the present invention
Special characteristic, structure or characteristic at least one implementation.Different in this manual places go out
Existing " in one embodiment " not refers both to same embodiment, is not single or selectivity
The embodiment mutually exclusive with other embodiments.
Secondly, the present invention utilizes structural representation etc. to be described in detail, and the embodiment of the present invention is being described in detail in detail
Time, for purposes of illustration only, represent hardware frequency measurement and the frequency tracking method knot being applicable to feeder terminal unit
The schematic diagram of structure can be disobeyed general ratio and be made partial enlargement, and described schematic diagram is example, its
This should not limit the scope of protection of the invention.Additionally, should comprise in actual fabrication length, width and
The three dimensions of the degree of depth.
Embodiment one
Refer to a kind of hardware frequency measurement being applicable to feeder terminal unit that Fig. 1, Fig. 1 are the present invention and
The system schematic of frequency tracking method.The hard of feeder terminal unit it is applicable to described in as it is shown in figure 1,
Part frequency measurement and frequency tracking method, got off the voltage acquisition of feeder line by voltage transformer, then
By voltage follower circuit, squared circuit, signal is processed, obtain square-wave signal, by square wave
GPIO, the GPIO pin of signal access line feed terminals CPU detects the rising edge of voltage square wave signal,
Interruption will be entered, GPIO interrupt in by intervalometer Timer0 calculate used by twice interruption time
Between, draw the real-time period of each cycle, electric voltage frequency, according to this cycle, real time modifying timing
The timing of device Timer1, the effect of intervalometer Timer1 is to trigger ADC to gather feeder line electricity
Pressure, thus reach hardware frequency measurement, the purpose of real-time frequency tracking.
Described voltage transformer, collects the primary voltage of feeder line, the secondary that mutual inductance is got off
Voltage, coincident circuit requirement, and well primary equipment and secondary Feeder Terminal Unit are kept apart.
Incorporated by reference to Fig. 1 and refering to Fig. 3, Fig. 3 be that a kind of of the present invention is applicable to feeder terminal unit
The voltage follower circuit schematic diagram of hardware frequency measurement and frequency tracking method.As shown in figures 1 and 3, institute
Stating voltage follower circuit, mainly built by device OPA4348AID and resistance capacitance, voltage is put
Big multiple perseverance less than and close to 1, play buffering, isolate, improve the effect of load capacity.
It is applicable to line feed terminals incorporated by reference to Fig. 1 and refering to the one that Fig. 2 and Fig. 4, Fig. 2 are the present invention
The hardware frequency measurement of device and the sine wave of frequency tracking method are converted to the schematic diagram of square wave;Fig. 4 is this
A kind of hardware frequency measurement being applicable to feeder terminal unit of invention and the squared electricity of frequency tracking method
Road schematic diagram.As shown in Figure 2 and Figure 4, described squared circuit, mainly by device OPA4348AID
Building with resistance capacitance, mode of building is different from voltage follower circuit, and squared circuit is by electricity
Relatively, the sine wave signal collected by transformer is converted into square-wave signal by comparing to pressure ratio, signal
Frequency do not change.
Described GPIO pin, is configured to rising edge and interrupts, when it detects rising edge signal, and can
To enter interruption, in interruption, calculate the time used by twice interruption by intervalometer Timer0, draw
Square-wave cycle.
Described Timer0 intervalometer, is not provided with Interruption, a timing, and timing time is 0.5s,
When GPIO pin interrupts every time, read the value of a Timer0 intervalometer.
Described Timer1 intervalometer, gathers the voltage of feeder line, current analog for triggering ADC
Signal, Timer1 intervalometer timing is determined by the sample rate in feeder line each cycle, it is assumed that feedback
Line line period is n, and each sampling period samples i time, then the timing of Timer1 is: n/i
Millisecond.
In the present embodiment, the frequency of feeder line is 50Hz, and the cycle of the most each cycle is
1/50=20ms, each cycle 64 points of sampling.
The voltage signal of feeder line, through voltage transformer collection, obtains secondary side small voltage signal,
By voltage follower circuit, squared circuit, signal is processed, obtain square-wave signal, pass through CPU
The rising edge of GPIO pin detection square-wave signal, and enter interruption, fixed by reading in interruption
Time device Timer0 timing time, obtain time Timer0a and Timer0b of adjacent interruption logging,
The i.e. cycle of this cycle is: (Timer0b-Timer0a) ms, and frequency is:
1/ (Timer0b-Timer0a) Hz, when the frequency of feeder line varies more than 0.05Hz, i.e. (50-
(1/ (Timer0b-Timer0a))) absolute value more than 0.05Hz, the sampled point in a cycle is just
It not 64, need to carry out frequency-tracking, it is ensured that be 64 complete points in each cycle, i.e.
Changing the timing of intervalometer Timer1, during 50Hz, the timing of intervalometer Timer1 is:
(1/50)/64, i.e. 0.3125ms, after frequency change, the timing of intervalometer Timer1 needs to change
Become: (Timer0b-Timer0a)/64ms, thus can ensure that each cycle is complete 64
Individual sampled point, thus improve electric current, the accuracy of voltage sample code value, it is ensured that electric current, voltage
The correctness of virtual value, it is ensured that the accuracy of power calculation.Improve the precision of feeder means, performance.
Those of ordinary skill in art it should be appreciated that, the feature of the present invention or purpose
One of be: the hardware frequency measurement being applicable to feeder terminal unit of the present invention and frequency-tracking side
Method, uses hardware circuit to gather the voltage of feeder line, and carries out voltage follow, squared process,
Triggered by the GPIO rising edge of device CPU and interrupt, and the Timer0 intervalometer timing within CPU,
Can calculate the real-time frequency of feeder line, it is few that hardware frequency measurement takies cpu load, and precision is high, error
Less than ± 0.02Hz.In using the Timer1 intervalometer within CPU to trigger sheet, ADC gathers feeder messenger wire
The voltage x current on road, the timing of the frequency shift Timer1 intervalometer that can be recorded in real time by hardware
Time, it is achieved whole wave collection, it is ensured that each cycle gathers the analog quantity of regulation and counts, thus real
Existing frequency-tracking.Thus improve electric current, the accuracy of voltage sample code value, it is ensured that electric current, electricity
It is pressed with the correctness of valid value, it is ensured that the accuracy of power calculation.Improve the precision of feeder means, property
Energy.
It should be noted that above example is only in order to illustrate technical scheme and unrestricted, to the greatest extent
The present invention has been described in detail by pipe with reference to preferred embodiment, and those of ordinary skill in the art should
Understand, technical scheme can be modified or equivalent, without deviating from the present invention
The spirit and scope of technical scheme, it all should be contained in the middle of scope of the presently claimed invention.
Claims (4)
1. being applicable to hardware frequency measurement and the frequency tracking method of feeder terminal unit, its feature exists
In, including:
The voltage of feeder line is gathered by voltage transformer,
Use hardware frequency measurement circuit that the voltage sine wave signal of described feeder line is adjusted to same frequency
Square-wave signal,
By square-wave signal described in the rising edge interrupt trap of the GPIO pin of CPU,
Calculate square-wave cycle by Timer0 intervalometer, draw real-time feeder line frequency,
By changing the timing of the intervalometer Timer1 within described CPU, change each cycle
Trigger ADC sampling number, it is achieved whole wave is sampled.
It is applicable to hardware frequency measurement and the frequency-tracking of feeder terminal unit the most as claimed in claim 1
Method, is characterized in that: described hardware frequency measurement circuit includes voltage follower circuit and squared circuit.
It is applicable to hardware frequency measurement and the frequency-tracking of feeder terminal unit the most as claimed in claim 1
Method, is characterized in that: described by Timer0 intervalometer calculating square-wave cycle, draws real-time feedback
Line line frequency is particularly as follows: sample clock generator Timer0 recorded between the time of twice GPIO pin interruption
Every, calculate real-time feeder line frequency.
It is applicable to hardware frequency measurement and the frequency-tracking of feeder terminal unit the most as claimed in claim 1
Method, is characterized in that: during described timing by the intervalometer Timer1 changed within described CPU
Between, change each cycle and trigger ADC sampling number, it is achieved whole wave sampling is particularly as follows: sampling internal
Intervalometer Timer1 triggers ADC sampling, by the real-time frequency of feeder line, changes Timer1's
Timing, it is achieved real-time frequency is followed the tracks of.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610331521.4A CN106018957A (en) | 2016-05-18 | 2016-05-18 | Hardware frequency measurement and frequency tracking method suitable for feed line terminal device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610331521.4A CN106018957A (en) | 2016-05-18 | 2016-05-18 | Hardware frequency measurement and frequency tracking method suitable for feed line terminal device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106018957A true CN106018957A (en) | 2016-10-12 |
Family
ID=57098709
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610331521.4A Pending CN106018957A (en) | 2016-05-18 | 2016-05-18 | Hardware frequency measurement and frequency tracking method suitable for feed line terminal device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106018957A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106597095A (en) * | 2016-12-22 | 2017-04-26 | 南京因泰莱电器股份有限公司 | Double-CPU uniformly-spaced sampling frequency-tracking implementation method |
CN108761201A (en) * | 2018-04-04 | 2018-11-06 | 何晓龙 | bit stream frequency measuring device and method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04142469A (en) * | 1990-10-02 | 1992-05-15 | Fuji Electric Co Ltd | Frequency detecting method for ac wave-form |
CN103424619A (en) * | 2013-08-15 | 2013-12-04 | 陕西海泰电子有限责任公司 | Timing counter frequency measurement system and method |
CN104391176A (en) * | 2014-12-13 | 2015-03-04 | 华北电力大学 | Software and hardware frequency measurement circuit compatible with electric power system signals |
-
2016
- 2016-05-18 CN CN201610331521.4A patent/CN106018957A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04142469A (en) * | 1990-10-02 | 1992-05-15 | Fuji Electric Co Ltd | Frequency detecting method for ac wave-form |
CN103424619A (en) * | 2013-08-15 | 2013-12-04 | 陕西海泰电子有限责任公司 | Timing counter frequency measurement system and method |
CN104391176A (en) * | 2014-12-13 | 2015-03-04 | 华北电力大学 | Software and hardware frequency measurement circuit compatible with electric power system signals |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106597095A (en) * | 2016-12-22 | 2017-04-26 | 南京因泰莱电器股份有限公司 | Double-CPU uniformly-spaced sampling frequency-tracking implementation method |
CN106597095B (en) * | 2016-12-22 | 2019-09-10 | 南京因泰莱电器股份有限公司 | A kind of frequency-tracking implementation method of dual processors equal interval sampling |
CN108761201A (en) * | 2018-04-04 | 2018-11-06 | 何晓龙 | bit stream frequency measuring device and method |
CN108761201B (en) * | 2018-04-04 | 2020-05-22 | 何晓龙 | Bit stream frequency measurement device and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1316256C (en) | Electric network geomagnetic induction current monitoring method and apparatus | |
CN103207351B (en) | A kind of power transmission line fault locating method based on reclosing | |
CN108508320B (en) | Arc grounding fault identification method based on harmonic energy and wave distortion feature | |
CN108181547A (en) | A kind of dynamic time warping distance fault section location method based on Time Series Compression | |
CN102944860B (en) | Method and device for comparing running errors of optical current transformer and electromagnetic current transformer in real time | |
CN102305891A (en) | On-line monitoring method of low-frequency oscillation of power system | |
CN106124939A (en) | Distributed high tension cable partial discharge monitoring and alignment system | |
CN102819004A (en) | Comprehensive detecting and analyzing platform for performance of digital electric energy metering systems of intelligent transformer substations | |
CN201277997Y (en) | Full parameter on-line monitoring apparatus for overhead transmission line and lightning arrester current | |
CN106291085B (en) | Short-circuit current of near zone of transformer monitoring method | |
CN103197218A (en) | High-voltage cable insulation defect partial discharge electrification detection diagnostic method | |
CN105259471A (en) | Three-dimensional fault line selection method based on random resonance and transient current signal | |
CN107247182A (en) | A kind of m-Acetyl chlorophosphonazo component restoring method based on measurement phasor data | |
CN106841778A (en) | The processing method of the subsynchronous and supersynchronous harmonic parameters realized based on PMU | |
CN203658526U (en) | Live-line detection device used for partial discharging of distribution cable | |
CN101408565A (en) | 35KV power distribution station internal and external over voltage monitoring method based on voltage mutual inductor sample | |
CN102035261A (en) | Monitoring system for smart grid | |
CN106841574A (en) | A kind of composite soil detection means of Multifunction superposition | |
CN110716097B (en) | Power supply network topology identification method and device | |
CN109001577A (en) | A kind of electrical energy measurement live data analysis method and system | |
CN101369727B (en) | Route selection method aiming at electric arc ground fault | |
CN107884739A (en) | A kind of powered analysis system of electronic mutual inductor | |
CN105262069A (en) | High-voltage DC line pilot protection method based on fault DC component | |
CN106018957A (en) | Hardware frequency measurement and frequency tracking method suitable for feed line terminal device | |
CN206411250U (en) | A kind of DC electronic current transformer digitizes real-time calibration equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161012 |