CN104536285A - High-efficiency crystal oscillator frequency timekeeping method - Google Patents
High-efficiency crystal oscillator frequency timekeeping method Download PDFInfo
- Publication number
- CN104536285A CN104536285A CN201410689747.2A CN201410689747A CN104536285A CN 104536285 A CN104536285 A CN 104536285A CN 201410689747 A CN201410689747 A CN 201410689747A CN 104536285 A CN104536285 A CN 104536285A
- Authority
- CN
- China
- Prior art keywords
- crystal oscillator
- remainder
- per
- counting
- pps
- 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.)
- Granted
Links
Landscapes
- Oscillators With Electromechanical Resonators (AREA)
- Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)
Abstract
The invention relates to a high-efficiency crystal oscillator frequency timekeeping method. According to the method, a device can receive a time synchronization signal of a time synchronizing device or a signal output by a GPS reception module; when the time synchronization signal or a satellite signal is normal, the crystal oscillator counting number in each second is calculated and cached; when the time synchronization signal or the satellite signal is lost, the average crystal oscillator counting number is calculated according to the recorded second-pulse crystal oscillator number, and generated remainder is shared equally; and the crystal counting number in each second after average and remainder sharing provides second pulses for time keeping. The method can be used improve the timekeeping precision and operation efficiency of equipment.
Description
Technical field
The present invention relates to a kind of high efficiency crystal oscillator frequency timekeeping method, belong to intelligent substation development field.
Background technology
Intelligent substation is a developing direction of transformer station in intelligent grid, and one of principal character of intelligent substation is exactly the use of electric mutual inductor.Along with the use of electric mutual inductor, the analog acquisition pattern of transformer station there occurs change, the signal exported due to electric mutual inductor is small-signal, voltage is lower, be not suitable for long-distance transmissions, need complete analog quantity conversion on the spot, and the electric mutual inductor in interval is apart from distant, the collection of all electric mutual inductors in interval can not be completed by a device, like this, just there is the situation that in an interval, electronic transducer sampling is separate, in order to complete the analog quantity at an interval distributed collection after synchronous, just there is the merge cells device of synchronous electric mutual inductor.
Merge cells completes multiple collector data and merges, and at present the method for resampling that adopts completes data syn-chronization more, this be just combined unit pair time precision have certain requirement, pair time precision quality directly have influence on the phase place of analog acquisition.In order to ensure the stable operation of intelligent substation; in standing pair time equipment and merge cells device all must possess punctual function; ensure can not to the protection of transformer station produce significant impact in certain hour when loss pair after signal, occur the accidents such as malfunction, the time of fault during reservation process pair.
At present, in industry, some researchs are done to the punctual method of crystal oscillator frequency, as patent document " self-adaptation crystal oscillator frequency timekeeping method " (application number: technical scheme 201010589598.4): when pair time signal normal time, measure the frequency of crystal oscillator simultaneously; When reference signal step-out, pair time server according to the crystal oscillator frequency measured time synchronous, adopt self-adaptation crystal oscillator frequency timekeeping mode clock signal.The program ensure that the stable operation of intelligent substation to a certain extent, but in the occasion higher to punctual accuracy requirement, adopts this punctual scheme to there will be the problem that in the short time, punctual deviation is excessive.
Summary of the invention
The object of the invention is to provide a kind of high efficiency crystal oscillator and keeps time method, is intended to solve intelligent substation functional device of keeping time and keeps time the excessive problem of deviation.
For solving the problems of the technologies described above, the technical scheme of a kind of high efficiency crystal oscillator frequency timekeeping method of the present invention comprises the following steps:
1) signal when equipment receives pair, and pps pulse per second signal when parsing required pair;
2) normal pulse per second (PPS) crystal oscillator count buffer district and punctual pulse per second (PPS) buffer zone is created;
3) when time pair, signal is normal, the crystal oscillator counting of the initial time that device accurate recording is per second, and then calculate crystal oscillator counting per second, and the validity that crystal oscillator per second counts is judged, effective crystal oscillator per second counting is put into normal pulse per second (PPS) crystal oscillator count buffer district, buffer zone recurrent wrIting from first buffer zone again after piling;
4), time pair during abnormal signal, crystal oscillator counting f on average per second is calculated according to the pulse per second (PPS) crystal oscillator counting of buffer memory
ave, and the remainder y produced during mean value calculation is shared according to the Distribution dynamics preset; Remainder share after each number according to counting f with crystal oscillator on average per second respectively
aveaddition obtains crystal oscillator per second counting, and crystal oscillator counting per second is put into punctual pulse per second (PPS) buffer zone, and the value that device takes out in punctual pulse per second (PPS) buffer zone is successively kept time.
Step 2) described normal pulse per second (PPS) crystal oscillator count buffer district number be 2 i*n power, wherein i, n are positive integer and i≤n.
Step 4) described calculating on average per second crystal oscillator counting f
aveand the method that remainder y adopts is displacement and bit manipulation computing.
Step 4) described in the Distribution dynamics preset be:
A. create a remainder allocation table, set the amortization of data corresponding to remainder 0 ~ (2^i)-1 in table, by each remainder relatively uniform share for 2^i part, the value of every number certificate is 0 or 1;
B. the remainder y i position that moves to right is obtained mean value y
aveand remainder p, inquire about remainder allocation table according to remainder p and obtain corresponding a line value, the value of this row is added mean value y
ave, complete a remainder y and share into 2^i part;
C. continue to share according to step b to the every portion in 2^i part, complete a remainder y and share into 2^ (i*2) part;
D. continue to share according to step b to the every portion in 2^ (i*2) part, until complete a remainder y to share into 2^ (i*n) part, remainder y shares end.
The invention has the beneficial effects as follows: the present invention pair time signal or satellite-signal normal time, calculate and buffer memory crystal oscillator per second counting number; Pair time signal or satellite-signal lose time, average crystal oscillator counting number per second is calculated according to the pulse per second (PPS) crystal oscillator counting of record, and the remainder produced is shared equally, the crystal oscillator counting number per second after utilizing average computation and remainder to share equally provides pulse per second (PPS) to keep time.When calculating average crystal oscillator counting number per second, in order to avoid using division, adopting displacement and bit manipulation computing, on various hardware, realizing the method to facilitate.After calculating crystal oscillator counting number on average per second, because crystal oscillator counting number is integer, generally all can produces remainder, in order to avoid remainder is on the impact of punctual precision, need to do remainder to share process.In the process that remainder is shared, cause the punctual deviation of short time excessive in order to avoid sharing inequality, need as much as possible remainder to be inserted in the punctual second of interval uniformly, the present invention adopts each point 8 parts of methods of sharing, coordinate look-up table, complete evenly sharing of remainder, thus reach higher punctual precision.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of the embodiment of the present invention.
Embodiment
Be illustrated in figure 1 embodiment of the present invention particular flow sheet, the concrete steps of the inventive method are as follows:
Step 1: create and receive pulse per second (PPS) crystal oscillator count buffer district rev_buf, buffer size is 512, for recording 512 nearest pulse per second (PPS) crystal oscillator countings normally received;
Step 2: create 512 punctual pulse per second (PPS) buffer zones, for device pair time abnormal signal time, utilize receive pulse per second (PPS) crystal oscillator counting fill this buffer zone, the counting that device recycles this buffer zone completes punctual function;
Step 3: create a tables of data, for the remainder obtained divided by 8 is on average inserted into 8 buffer zones, the concrete tables of data implemented is as follows:
The remainder allocation table of table one 8
Remainder | Buf1 | Buf2 | Buf3 | Buf4 | Buf5 | Buf6 | Buf7 | Buf8 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
3 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 |
4 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
5 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 0 |
6 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 |
7 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
Step 4: device when receiving normal pair during signal, calculates the crystal oscillator counting of each second, puts into successively and receive rev_buf, buffer zone recurrent wrIting from first buffer zone again after piling;
Step 5: device is when determining loss pair during signal, and device counts to 512 pulse per second (PPS) crystal oscillators in rev_buf the sum that sues for peace to obtain, and sum is moved to right 9 and obtains mean value f
ave, low 9 that get sum obtain remainder y.
Step 6: being shared equally by remainder y is 512 parts, and concrete steps are as follows:
A. remainder y is moved to right 3 and obtains mean value p, get low 3 of y remainder y, find corresponding a line in Table 1 according to the value of remainder y, the value of this row is all added mean value p, completing that a remainder y shares equally is 8 parts.
B. to each data in above-mentioned 8 parts, sharing equally respectively according to the method for steps A is 8 parts, completes that to be shared equally by remainder y be 64 parts like this.
C. to each data in above-mentioned 64 parts, sharing equally respectively according to the method for steps A is 8 parts, completes that to be shared equally by remainder y be 512 parts like this, and the remainder process of sharing equally terminates.
Step 7: the every portion in 512 parts after being shared equally by above-mentioned remainder all adds mean value f
ave, obtain 512 pulse per second (PPS) crystal oscillator countings, be filled into punctual pulse per second (PPS) buffer zone respectively, the value that device takes out in punctual pulse per second (PPS) buffer zone is successively kept time.
Be the n power of 8 in the above-described embodiments by setting buffers, correspondingly create the remainder allocation table of 8, but the present invention is not limited to this setup, it can also be the n power of 2,4,16 etc. by setting buffers, correspondingly create one 2,4, the ground remainder allocation tables such as 16, but the set-up mode that the present embodiment adopts can realize remainder quickly and easily shares.
Be presented above concrete embodiment, but the present invention is not limited to described embodiment.Basic ideas of the present invention are above-mentioned basic scheme, and for those of ordinary skill in the art, according to instruction of the present invention, designing the model of various distortion, formula, parameter does not need to spend creative work.The change carried out embodiment without departing from the principles and spirit of the present invention, amendment, replacement and modification still fall within the scope of protection of the present invention.
Claims (4)
1. a high efficiency crystal oscillator frequency timekeeping method, is characterized in that, the step comprised is as follows:
1) signal when equipment receives pair, and pps pulse per second signal when parsing required pair;
2) normal pulse per second (PPS) crystal oscillator count buffer district and punctual pulse per second (PPS) buffer zone is created;
3) when time pair, signal is normal, the crystal oscillator counting of the initial time that device accurate recording is per second, and then calculate crystal oscillator counting per second, and the validity that crystal oscillator per second counts is judged, effective crystal oscillator per second counting is put into normal pulse per second (PPS) crystal oscillator count buffer district, buffer zone recurrent wrIting from first buffer zone again after piling;
4), time pair during abnormal signal, crystal oscillator counting f on average per second is calculated according to the pulse per second (PPS) crystal oscillator counting of buffer memory
ave, and the remainder y produced during mean value calculation is shared according to the Distribution dynamics preset; Remainder share after each number according to counting f with crystal oscillator on average per second respectively
aveaddition obtains crystal oscillator per second counting, and crystal oscillator counting per second is put into punctual pulse per second (PPS) buffer zone, and the value that device takes out in punctual pulse per second (PPS) buffer zone is successively kept time.
2. the high efficiency crystal oscillator frequency timekeeping method of one according to claim 1, is characterized in that, step 2) described normal pulse per second (PPS) crystal oscillator count buffer district number be 2 i*n power, wherein i, n are positive integer and i≤n.
3. the high efficiency crystal oscillator frequency timekeeping method of one according to claim 2, is characterized in that, step 4) described calculating on average per second crystal oscillator counting f
aveand the method that remainder y adopts is displacement and bit manipulation computing.
4. the high efficiency crystal oscillator frequency timekeeping method of one according to claim 3, is characterized in that, step 4) described in the Distribution dynamics preset be:
A. create a remainder allocation table, set the amortization of data corresponding to remainder 0 ~ (2^i)-1 in table, by each remainder relatively uniform share for 2^i part, the value of every number certificate is 0 or 1;
B. the remainder y i position that moves to right is obtained mean value y
aveand remainder p, inquire about remainder allocation table according to remainder p and obtain corresponding a line value, the value of this row is added mean value y
ave, complete a remainder y and share into 2^i part;
C. continue to share according to step b to the every portion in 2^i part, complete a remainder y and share into 2^ (i*2) part;
D. continue to share according to step b to the every portion in 2^ (i*2) part, until complete a remainder y to share into 2^ (i*n) part, remainder y shares end.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410689747.2A CN104536285B (en) | 2014-11-25 | 2014-11-25 | A kind of efficient crystal oscillator frequency timekeeping method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410689747.2A CN104536285B (en) | 2014-11-25 | 2014-11-25 | A kind of efficient crystal oscillator frequency timekeeping method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104536285A true CN104536285A (en) | 2015-04-22 |
CN104536285B CN104536285B (en) | 2017-08-08 |
Family
ID=52851829
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410689747.2A Expired - Fee Related CN104536285B (en) | 2014-11-25 | 2014-11-25 | A kind of efficient crystal oscillator frequency timekeeping method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104536285B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105572698A (en) * | 2016-01-18 | 2016-05-11 | 郑州威科姆科技股份有限公司 | Form-coupling-based time service maintenance method for satellite receiver |
CN106201970A (en) * | 2016-06-22 | 2016-12-07 | 广东电网有限责任公司电力科学研究院 | A kind of information collecting device and method |
CN106527112A (en) * | 2016-11-11 | 2017-03-22 | 重庆微标科技股份有限公司 | High precision time acquisition method and device |
CN107017959A (en) * | 2017-03-22 | 2017-08-04 | 广州致远电子股份有限公司 | The method and device of punctual precision is improved during a kind of utilization pair |
CN108803300A (en) * | 2018-05-23 | 2018-11-13 | 许继集团有限公司 | The punctual method of time synchronism apparatus based on constant-temperature crystal oscillator and time synchronism apparatus |
CN109597297A (en) * | 2018-12-11 | 2019-04-09 | 烟台持久钟表有限公司 | A kind of crystal oscillator compensation method and device |
CN110492966A (en) * | 2019-09-12 | 2019-11-22 | 积成电子股份有限公司 | A kind of method for synchronizing time of distribution protective relaying device |
CN111208539A (en) * | 2019-12-18 | 2020-05-29 | 中国航空工业集团公司成都飞机设计研究所 | High-precision GNSS simulator time synchronization method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101667010A (en) * | 2009-09-28 | 2010-03-10 | 浙江大学 | GPS synchronous clock carrier power source |
CN102004441B (en) * | 2010-12-15 | 2012-07-04 | 许继集团有限公司 | Adaptive crystal oscillator frequency timekeeping method |
CN103970008B (en) * | 2014-05-06 | 2017-02-15 | 积成电子股份有限公司 | Timekeeping method based on crystal oscillator error compensation |
-
2014
- 2014-11-25 CN CN201410689747.2A patent/CN104536285B/en not_active Expired - Fee Related
Non-Patent Citations (1)
Title |
---|
张春鹏: "电子式互感器合并单元同步时钟模块的设计", 《中国优秀硕士论文全文库 工程科技Ⅱ辑》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105572698A (en) * | 2016-01-18 | 2016-05-11 | 郑州威科姆科技股份有限公司 | Form-coupling-based time service maintenance method for satellite receiver |
CN105572698B (en) * | 2016-01-18 | 2018-02-23 | 郑州威科姆科技股份有限公司 | A kind of DVB time service keeping method based on form matching |
CN106201970A (en) * | 2016-06-22 | 2016-12-07 | 广东电网有限责任公司电力科学研究院 | A kind of information collecting device and method |
CN106201970B (en) * | 2016-06-22 | 2020-09-29 | 广东电网有限责任公司电力科学研究院 | Information acquisition device and method |
CN106527112A (en) * | 2016-11-11 | 2017-03-22 | 重庆微标科技股份有限公司 | High precision time acquisition method and device |
CN107017959A (en) * | 2017-03-22 | 2017-08-04 | 广州致远电子股份有限公司 | The method and device of punctual precision is improved during a kind of utilization pair |
CN108803300A (en) * | 2018-05-23 | 2018-11-13 | 许继集团有限公司 | The punctual method of time synchronism apparatus based on constant-temperature crystal oscillator and time synchronism apparatus |
CN109597297A (en) * | 2018-12-11 | 2019-04-09 | 烟台持久钟表有限公司 | A kind of crystal oscillator compensation method and device |
CN110492966A (en) * | 2019-09-12 | 2019-11-22 | 积成电子股份有限公司 | A kind of method for synchronizing time of distribution protective relaying device |
CN111208539A (en) * | 2019-12-18 | 2020-05-29 | 中国航空工业集团公司成都飞机设计研究所 | High-precision GNSS simulator time synchronization method |
CN111208539B (en) * | 2019-12-18 | 2023-06-23 | 中国航空工业集团公司成都飞机设计研究所 | High-precision GNSS simulator time synchronization method |
Also Published As
Publication number | Publication date |
---|---|
CN104536285B (en) | 2017-08-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104536285A (en) | High-efficiency crystal oscillator frequency timekeeping method | |
CN203164620U (en) | High precision time synchronization device | |
CN101331736B (en) | Using travel-time as means for improving the accuracy of simple network time protocol | |
CN202256483U (en) | GPS (Global Positioning System) second-based real-time self-adaptive evenly-spaced sampling synchronous data acquisition device | |
CN103941622B (en) | Occur frequently again the method for sampling pulse based on the high accuracy pulse per second (PPS) of FPGA | |
CN102998970B (en) | High-precision time hack synchronizing method based on CRIO platform | |
CN103616814A (en) | Synchronous sampling clock closed loop correcting method and system based on FPGA | |
CN102253358A (en) | Method for correcting electric energy meter by using correction system, and correction system | |
CN105376043B (en) | A kind of method for synchronizing time of double board systems | |
CN105306159A (en) | Clock timestamp compensation method and clock timestamp compensation device | |
CN103955257A (en) | Method and device for calibrating system clocks of single chip microcomputers, and air conditioner control system | |
CN103178779A (en) | Signal generator with amplitude compensation function and method thereof | |
CN103944660A (en) | Clock synchronization device and method | |
CN102664701A (en) | System and method for dynamically adjusting multichannel and wide-range clock transmission delay | |
CN102937819B (en) | On-board computer time label output system | |
CN102081400B (en) | Sequence of event (SOE) recording module and adjusting method thereof | |
CN106383438B (en) | One kind taming and dociling clock method based on sliding window time extension high-precision | |
CN108206683B (en) | Dynamic compensation pulse circuit | |
CN103684358B (en) | Sampling pulse generates method and apparatus | |
CN101083815B (en) | Method and apparatus for realizing mobile terminal clock relation track | |
CN102710359B (en) | Accurate clock frequency synchronizing method and device based on IEEE1588 (institute of electrical and electronics engineers) | |
CN204180093U (en) | A kind of PPS system balance device based on FPGA | |
CN110928177B (en) | Clock synchronization system and method | |
CN105026938A (en) | Signal processing apparatus | |
CN103117845A (en) | Modification method, device and system of transparent clock residence time |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170808 Termination date: 20201125 |