A kind of timing method and equipment based on gps signal
The present invention relates to provide in the communications field technology of precision clock, more particularly, relate to a kind of timing method and equipment based on GPS.
U.S. Department of Defense set up the whole world regularly location navigation satellite system (NAVSTAR GPS is hereinafter to be referred as gps system) for people whenever in any place accurate timing and location be provided may.But U.S. government has and has added selectivity interference (SELECTIVE AVAILABLITY, to be to claim S.A. to disturb) in the signal of the satellites transmits of being intended to, and the timing bearing accuracy that domestic consumer is obtained descends greatly, timing accuracy reduces to ± and more than the 150ns.Various countries major company is corresponding to develop various GPS receiving equipments to extract a metastable output from the satellite-signal that is being mingled with the S.A interference, wherein the HP58503 gps time of Hewlett-Packard and frequency standard receiver disturb with elimination S.A. by the smothing filtering of long-time (a hour), obtain effect preferably.But this scheme needs an expensive long-time stable crystal (more than the secondary), could come filtering S.A. to disturb with long-time smothing filtering effectively, crystal instability (for example adopt be three grades of crystal) else if, the frequency drift of crystal self is considerable in one hour, can't carry out long smothing filtering; This scheme also needs the crystal periphery circuit of corresponding complexity so that the crystal operate as normal; In addition, in order to carry out long smothing filtering, need the data of jumbo storer with the very long interocclusal record of storage, and worsen suddenly in satellite signal quality, under the situation through recovering again after a while, because this scheme averages the non-volatile recording data, the data of record also will still be continued to use as valid data in a very long time when satellite signal quality worsens, and make this equipment need the long period could recover stable output.
Purpose of the present invention overcomes exactly states shortcoming, provides a kind of adult low, simple in structure, can catch gps signal rapidly, and situation about recovering again after the satellite-signal deterioration is recovered stable timing method and the equipment of exporting based on gps signal rapidly.
For realizing purpose of the present invention, one aspect of the present invention: a kind of timing method based on gps signal, comprise each the GPS pulse of relatively receiving and the phase differential of local divided pulse, and store this phase differential, it is characterized in that according to effectively a data reserves N is set in filtering S.A. interference and the timely requirement of adjusting crystal, after being filled with N described differing, data are carried out smoothing processing, adjust described crystal, described to data carry out smoothing processing, the process of adjusting described crystal comprises following key step:
(1) calculates the mean value of N the described phase differential stored, obtain one and on average differ, and store this and on average differ;
(2) described on average differing with a predefined standard differed comparison, obtain differing changing value E;
(3) described on average the differing with last described on average differing of being stored that this is obtained compares, and obtains differing rate of change EC;
(4) differ changing value and the described rate of change that differs according to described, and deposit in advance differ changing value and the described rate of change that differs is that the crystal control voltage difference Δ U that should apply is determined in the binary voltages control table of independent variable with described;
(5) described crystal control voltage difference Δ U is added on the current control voltage, adjusts local pulse per second (PPS).
The present invention is on the other hand: a kind of timing method based on gps signal, comprise each the GPS pulse of relatively receiving and the phase differential of local divided pulse, and store this phase differential, it is characterized in that according to effectively a data reserves N is set in filtering S.A. interference and the timely requirement of adjusting crystal, after being filled with N described differing, data are carried out smoothing processing, adjust described crystal, described to data carry out smoothing processing, the process of adjusting described crystal comprises following key step:
(1) calculates the mean value of N the described phase differential stored, obtain one and on average differ, and store this and on average differ;
(2) described on average differing with a predefined standard differed comparison, obtain differing changing value E;
(3) described on average the differing with last described on average differing of being stored that this is obtained compares, and obtains differing rate of change EC;
(4) by formula Δ U=λ
1E+ λ
2EC directly tries to achieve described crystal current pressure-controlled difference.
(5) described crystal control voltage difference Δ U is added on the current control voltage, adjusts local pulse per second (PPS).
Timing device based on gps signal of the present invention comprises GPS receiving antenna, GPS card, phase detector, CPU, RAM, EPROM, D/A converter, voltage-controlled crystal (oscillator), frequency multiplier and frequency divider.Described GPS cartoon is crossed described gps antenna receiving satellite signal, therefrom recover the GPS pulse and give described phase detector, the phase differential of the local divided pulse that GPS pulse that described phase detector relatively recovers from satellite-signal and local frequency divider provide, give described CPU with this phase differential, described CPU is stored in this phase differential among the RAM of institute, after described RAM stores a certain amount of data, described CPU handles this batch data and obtains described changing value E and the described rate of change EC that differs of differing, differ changing value E and the described rate of change EC that differs searches the described binary voltages control table of storing among the described EPROM according to described, determine to regulate the described crystal control voltage difference Δ U of described voltage-controlled crystal (oscillator), by described D/A converter described Δ U is added on the described voltage-controlled crystal (oscillator), adjusts the output frequency of described voltage-controlled crystal (oscillator).Described frequency divider and described frequency multiplier are given in the output of described voltage-controlled crystal (oscillator) simultaneously, described frequency divider produces the output of the timing device of basic gps signal of the present invention, and produce local divided pulse, described frequency multiplier produces the 65MHZ signal and gives described phase detector, count with the 65MHZ signal, write down differing of local divided pulse and GPS pulse.
Because what the present invention adopted is three grades of crystal, therefore greatly reduce the cost of present device; Simultaneously by adopting the inventive method to solve the frequency drift and the frequency jitter problem of S.A interference and voltage-controlled crystal (oscillator) preferably, make the output accuracy of present device can be comparable, show that after tested present device has been achieved as follows performance index with the external same category of device that has adopted gem-quality crystal (more than the secondary):
Phase drift characteristic: hundred seconds level<50ns
Kilosecond level<100ns
Maximum<170ns
Frequency characteristic: short-term (shake)≤5 * 10
-10
For a long time≤5 * 10
-10
In addition; present device need not jumbo storer and complicated crystal holding circuit; thereby make circuit structure simple; and worsen suddenly at gps signal; under the situation through recovering again after a while; can be with the very fast renewal of data of storage, therefore (about four minutes) recover stable output rapidly.
Below in conjunction with the description of drawings embodiments of the invention.In the accompanying drawing:
Fig. 1 is the structural representation of an embodiment of timing device of basic gps signal of the present invention:
Fig. 2 is the process flow diagram of the timing method of basic gps signal of the present invention;
Fig. 3 catches GPS pulse per second (PPS) frequency step S202 process flow diagram fast for shown in Fig. 2;
Fig. 4 is the process flow diagram of the precise frequency of output shown in Fig. 2 step S206;
Fig. 5 is the process flow diagram of Control of Voltage table described in structure the present invention.
Referring to Fig. 1, this illustrates the timing device based on gps signal of the present invention and comprises: GPS receiving antenna 101, GPS card 102, phase detector 103, CPU104, RAM105, EPROM106, D/A converter 107, voltage-controlled crystal (oscillator) 108, frequency multiplier 109 and frequency divider 110.The described GPS card 102 (VPONCORE that produces for motorola inc in the present embodiment, per second pulse per second (PPS) SP once is provided) by described gps antenna 101 receiving satellite signals, therefrom recover the GPS pulse per second (PPS) and give described phase detector 103, the phase differential of the 1HZ signal that pulse per second (PPS) SP that described phase detector 103 relatively recovers from satellite-signal and local frequency divider 110 provide, give described CPU104 with the phase differential that obtains, described CPU104 is stored in this phase differential among the described RAM105, after described RAM is filled with a certain amount of data, described CPU handles this batch data and obtains differing changing value E and differ rate of change EC, according to E and EC search look for store among the EPROM106 one to differ changing value and to differ the binary voltages control table that rate of change is an independent variable (back will be described the generation of this table in conjunction with Fig. 5 in detail), determine to regulate the crystal control voltage difference Δ U of described voltage-controlled crystal (oscillator) 108, by described D/A converter 107 Δ U is added on the described voltage-controlled crystal (oscillator) 108, adjusts the output frequency of described voltage-controlled crystal (oscillator) 108; Described CPU also with described GPS cartoon letters, the state parameter of GPS card is provided with and reads information such as whether normal satellite-signal from the GPS card.Described frequency divider 110 and described frequency multiplier 109 are given in the output of described voltage-controlled crystal (oscillator) simultaneously, the signal that described frequency divider 110 produces 2MHZ and 8MHZ is as the output of the timing device based on gps signal of the present invention, and produce the 1HZ signal as local pulse per second (PPS), described frequency multiplier 109 produces the 65MHZ signal and gives described phase detector 103, count with the 65MHZ signal, write down the phase differential of local pulse per second (PPS) and GPS pulse per second (PPS), described RAM105 also differs changing value according to the instruction storage of described CPU and differs data such as rate of change.The required program of described CPU104 exists among the described EPROM106.
Timing method based on gps signal of the present invention needs each the GPS pulse per second (PPS) that per second once relatively receives and the phase differential of local pulse per second (PPS), and store this phase differential, carry out following concrete steps as shown in Figure 2 simultaneously: at first finish initial work at step S201, comprise the RAM zero clearing, equipment crystal initialization voltage, and the phase differential number M and the N that set the requirement storage, described phase differential number has reflected the time interval that crystal control voltage is adjusted, and M<N, the value of M is less, catch the requirement of GPS pulse per second (PPS) frequency to satisfy fast short-term training, its optimum range is 2~7, the value of N need satisfy effectively, and filtering S.A disturbs, can in time adjust the requirement of voltage-controlled crystal (oscillator) again, its optimum range is 30--180, enters step S202 afterwards: the frequency of catching the GPS pulse per second (PPS) fast; Enter step S203 then: judge whether satellite-signal is normal, as be judged as "No", then repeated execution of steps S201 after step S204 resets; S203 is judged as "Yes" as step, then execution in step S205: the more up-to-date GPS pulse per second (PPS) of receiving and the phase differential of local pulse per second (PPS) are set at standard with this phase differential and differ and store; Enter step S206 then: enter lock-in state, further adjust local pulse per second (PPS), the output precise frequency; Judge at step S207 whether satellite-signal is normal, is "Yes" as judgement, then returns execution in step S206 then; Be judged as ' denying ' as step S207, then enter step S208: remain on the output that obtains among the step S206, and the data of storage before utilizing are when needed adjusted crystal, judge in step S209 then whether satellite-signal is normal, as be judged as ' denying ', then return execution in step S208; S209 is judged as "Yes" as step, then execution in step S206.Need illustrate that set up several circle queue data structure data such as phase differential, crystal current pressure-controlled difference of stored records GPS pulse per second (PPS) down and local pulse per second (PPS) respectively among the present invention, when formation was expired, the data of first storage were erased automatically; The present invention stores about 8000 GPS pulse per second (PPS)s and local pulse per second (PPS) differs, can be not normal at for example satellite-signal, S.A disturbs and strong etc. in particular cases utilize these data that crystal is done special adjustment.
Fig. 3 illustrates the included step of the S202 of step shown in Fig. 2: at first judge whether to be filled with M phase difference value (M sets) at step S301 in step S201, as be judged as "No", execution in step S301 after then delaying time 1 second in step S203; S301 is judged as "Yes" as step, then direct execution in step S303: M phase difference value of storage is average, and obtain one and on average differ, and store this and on average differ; Execution in step S304 then: judge whether to be filled with M phase difference value, as be judged as "No", then time-delay execution in step S304 after 1 second in step S305; S304 is judged as "Yes" as step, then direct execution in step S306: M phase difference of storage is average, obtain one and on average differ, and store this on average differ; Enter step S307 then: this on average differing with on average differing of last stored of trying to achieve is relatively obtained differing changing value E; Then enter step S308: set and differ rate of change EC=0; In step S309, differ changing value E and differ rate of change EC inquiry Control of Voltage table (building process of Control of Voltage table will be described) in the explanation in conjunction with Fig. 5 then, obtain crystal current pressure-controlled difference DELTA U and store this difference according to described; Then execution in step S310: Δ U is added on the current control voltage, adjusts the output frequency of crystal: execution in step S311 then: judge whether catch process soon finishes, as be judged as "No", then return execution in step S304; S311 is judged as "Yes" as step, then enters step S203 shown in Figure 2.
Referring to Fig. 4, this illustrates the included concrete steps of step S206 shown in Figure 2: at first judge whether to be filled with N phase difference value (N sets) at step S401 in step S201, as be judged as "No", repeated execution of steps S401 after in step S402, delaying time 1 second; S401 is judged as "Yes" as step, then direct execution in step S403; N phase difference value of storage is average, obtain one and on average differ, and store this and on average differ; Execution in step S404 then; The standard of setting among this on average differing of trying to achieve and the step S205 differed relatively obtain differing changing value E, then enter step S405; On average differing of the more current last time that on average differs Yu stored obtains differing rate of change EC (because in step S201 with the RAM zero clearing, for the first time during execution in step S405, described ' on average differing of the last time of being stored ' is set to 0); Enter step S406 then: according to differing changing value E and differ rate of change EC, and what deposit in advance is that the crystal control voltage difference Δ U that should apply is found in the binary voltages control table of independent variable with E and EC; Execution in step S407 is added in Δ U on the current control voltage then, adjusts local pulse per second (PPS), need illustrate, step S403 ask on average differ before, can be earlier carry out filtering to the phase difference of storage, remove and differ the bigger data of shake.
Fig. 5 illustrates structure and differs changing value and describedly differ the process flow diagram that rate of change is the described binary voltages control table of independent variable with described: at first limit the quantizing range that differs changing value E (90ns~90ns) at step S501, and be X interval (X gets 13 in this example) with this scope division, enter step S502 then: limit the quantizing range differ rate of change EC (90ns~90ns), and be Y interval (Y gets 13 in this example) with this scope division, follow execution in step S503: the quantizing range of qualification crystal control voltage difference Δ U (0.002V~0.002V), and be Z interval (Z gets 13 in this example) with this scope division, then at step S504 according to formula Δ U=λ
1E+ λ
2EC (λ herein
1, λ
2Expression is to the weighted value of E and EC) determine corresponding to each described changing value E and the described crystal control voltage difference Δ U that differs rate of change EC of differing promptly obtained a binary voltages control table, this binary voltages control table of storage in step S505 at last.
More than though the present invention has been described in conjunction with the embodiments; but obviously protection scope of the present invention is not limited thereto; those skilled in the art also may make all conspicuous changes; for example: in step S309, can not adopt the mode of inquiry binary voltages control table, and directly according to formula Δ U=λ
1E+ λ
2EC tries to achieve described crystal current pressure-controlled difference DELTA U; Adopt the GPS card of other companies, other models; Storer with other form replaces employed RAM and/or EPROM in the embodiment of the invention, can adopt other forms of data structure during the storage data; Can also change data quantity stored among the present invention, the protection domain of described M and N, and differ changing value, differ rate of change, the span of crystal control voltage difference and the interval of division, or the like.Therefore, protection scope of the present invention is only determined by claims.