METHOD AND DEVICE FOR ENERGY-SAVING EXTERNAL SYNCHRONIZATION OF CLOCKS IN A DISTRIBUTED REAL-TIME COMPUTER SYSTEM
20170357303 · 2017-12-14
Assignee
Inventors
Cpc classification
H04J3/0638
ELECTRICITY
H04J3/0667
ELECTRICITY
International classification
G06F1/12
PHYSICS
Abstract
The present invention relates to a method for synchronizing the clocks of the node computers of a distributed real-time system with an external time reference, such as GPS time, requiring minimal energy expenditure, and for structuring a sparse time-base. By considering the influence of changing physical environmental parameters on the period of oscillation of local oscillators, the holdover interval, according to which an external synchronization must occur, can be dynamically determined and the frequency of the energy-intensive external synchronization processes can be significantly reduced.
Claims
1. A method for energy-conserving implementation of a global time base in a distributed real-time computer system comprising a plurality of node computers, each node computer having a local clock and having access to an external reference time with the accuracy of an external time measurement A.sup.ref, wherein: starting from a required granularity G.sup.glo of the global time base and the given specified granularity g.sup.spec of the local clock of a node computer, a maximum offset interval O.sup.max of the tick of the local clock of the node computer with respect to the corresponding tick of the global time to the end time point of a holdover interval HOI is determined according to
O.sup.max=(f.sup.s.Math.G.sup.glo/2−A.sup.ref−2g.sup.spec) wherein f.sup.s is a safety factor, and wherein, next, in an initialization phase with a specified worst-case drift rate DR.sup.wc according to
HOI=O.sup.max/DR.sup.wc a first HOI with
N.sup.pl=HOI/g.sup.spec the number of planned ticks N.sup.pl of the local clock and with the initial granularity
g.sup.vor=g.sup.spez in the first HOI is determined, and wherein the start time point t.sup.B of the first HOI on the external time base is measured, and wherein, next, cyclically at the end of an HOI, the end time point t.sup.E of the just-elapsed HOI on the external time base is measured, wherein the end time point t.sup.E of an HOI simultaneously represents the start time point t.sup.B of the following HOI, and where, during the HOI, the number of the ticks N.sup.gez of the local clock is counted, and wherein, after the end of an HOI, the mean granularity g.sup.d of the local clock in the immediately-prior HOI is determined according to
g.sup.d=(t.sup.E−t.sup.B)/N.sup.gez wherein N.sup.gez sets forth the counted number of the ticks in the immediately-prior HOI, and wherein this mean granularity is set as an initial granularity of the current HOI, and wherein the number of the initially planned ticks N.sup.pl of the local clock in the current HOI is determined according to
N.sup.pl=O.sup.max/(g.sup.d−g.sup.vor) wherein g.sup.vor sets forth the initial granularity of the immediately-prior HOI, and where the initially planned length of the HOI is determined according to
HOI=N.sup.pl.Math.g.sup.d and wherein environment parameters of the local clock are periodically measured during the HOI, and—in the event of a change in an environment parameter relative to the start of the HOI—a change in the drift rate DR.sup.Δ is determined with the use of the corresponding drift rate change function DRAF and a current granularity g of the local clock is established according to
g=g.sup.d(1+DR.sup.Δ) and wherein the updated length of the current HOI is determined by means of
HOI.sup.akt=min{HOI,[O.sup.max/(|DR.sup.Δ|],HOI.sup.st} where HOI.sup.st sets forth the length of the HOI that arises from the stochastic drift rate, and where a new cycle is started at the end of the current HOI.
2. The method of claim 1, wherein the number of the ticks N.sup.glo of the local clock within one tick of the global time is determined according to
N.sup.glo=G.sup.glo/g wherein G.sup.glo sets forth the duration of a global tick and g sets forth the current value of the granularity of the local clock.
3. The method of claim 1, wherein a period P for measuring the environment parameters is determined according to
P=O.sup.max/DR.sup.wc wherein DR.sup.wc represents the specified worst-case drift rate of the oscillator.
4. The method of claim 1, wherein in the event of failure to measure the reference time at the end of an HOI, the periodic adjustment of the granularity of the local clock is continued due to change in environment parameters until an external reference time measurement can be performed again.
5. The method of claim 1, wherein a sparse time base is constructed with the global time base.
6. The method of claim 1, wherein after the end of an HOI, the current global time and/or the measured environment parameters of the oscillator and/or the used granularities of the local clock and/or the different drift rates DR during the HOI are stored in an environmental data bank.
7. The method of claim 1, wherein the parameters of the drift rate change function DRAF are adapted to the oscillator used in a node computer, preferably by assessment of the data saved in the environmental data bank.
8. A device for periodically generating a globally synchronized time message, comprising: a microcomputer having a CPU and a storage unit, a receiver for an external reference time signal, a quartz oscillator, a communication interface for sending messages, and a temperature sensor for measuring the temperature of the quartz oscillator, wherein the device is configured to carry out the method of claim 1 for realizing a global time base.
9. The device of claim 8 further comprising at least one sensor for measuring air pressure.
10. The device of claim 8, further comprising at least one sensor for measuring air humidity.
11. The device of claim 8, further comprising at least one sensor for measuring acceleration.
12. The device of claim 8, further comprising at least one GPS receiver.
13. The device of claim 8, further comprising at least one GLONAS receiver.
14. The device of claim 8, further comprising at least one GALILEO receiver.
15. The device of claim 8, further comprising at least one receiver for an eLORAN time signal.
16. The device of claim 8, further comprising at least one receiver for a DCF77 time signal.
17. The device of claim 8, which is configured as one structural unit.
18. The device of claim 8, wherein the microcomputer is configured to calculate a periodic time signal.
19. A distributed real-time computer system comprising: a plurality of node computers, each node computer having a local clock and having access to an external reference time with the accuracy of an external time measurement A.sup.ref, wherein the distributed real-time computer system is configured to carry out the method of claim 1 for energy-conserving realization of a global time base.
20. The distributed real-time computer system of claim 19, which comprises one or more devices for periodically generating a globally synchronized time message, wherein each of the one or more devices comprises: a microcomputer having a CPU and a storage unit, a receiver for an external reference time signal, a quartz oscillator, a communication interface for sending messages, and a temperature sensor for measuring the temperature of the quartz oscillator.
21. The distributed real-time computer system of claim 20, wherein one or more of the devices is arranged in each of the nodes of the real-time computer system.
Description
[0040] The present invention is described in greater detail hereinbelow with reference to the drawings. In the drawings,
[0041]
[0042]
[0043] One possible implementation of the present invention shall be explained with reference to the aforementioned drawings. Therein, the abbreviations shown in the following Tablel are used.
TABLE-US-00001 TABLE 1 Abbreviations used Symbol Dim Explanation A.sup.ref [sec] accuracy error (accuracy) of the external time measurement DR none drift rate of the oscillator DRAF none drift rate change function DR.sup.next none drift rate of the oscillator in the next HOI DR.sup.st none stochastic drift rate of the oscillator DR.sup.wc none worse case drift rate of the oscillator, according to the specification DR.sup.Δ none change in the drift rate due to change in environmental parameter(s) f.sup.s none safety factor of the required granularity of the global time base g [sec] granularity of the local clock g.sup.akt [sec] current granularity of the local clock g.sup.d [sec] mean granularity of the local clock in the immediately prior HOI G.sup.glo [sec] required granularity of the global time base, global time granule g.sup.spec [sec] specified granularity of the local clock g.sup.vor [sec] initial granularity of the local clock HOI [sec] holdover interval HOI.sup.akt [sec] current holdover interval HOI.sup.st [sec] longest holdover interval based on the stochastic drift rate N.sup.gez none counted number of ticks in the immediately-prior HOI N.sup.glo none number of ticks of the local clock in a global time granule G.sup.glo N.sup.pl none number of planned ticks N.sup.pl of the local clock in the HOI O.sup.max [sec] maximum offset of the global time at the end of the HOI P [sec] period P for measuring the environment parameters of a local clock t.sup.B [sec] point in time when the HOI starts, as measured with the external time reference t.sup.E [sec] point in time when the HOI ends, as measured with the external time reference
[0044] On the timeline 100 according to
[0045] Capturing the length of an interval with a digital reference clock with the granularity g requires that the time stamp of the start time point t.sup.B of the interval and the time stamp of the end time point t.sup.E of the interval are formed. The time stamp of an event is understood to mean the state of the reference clock at or immediately after the occurrence of the event. The length of the interval is then given by (t.sup.E−t.sup.B)±g. If the start time point and the end time point of different clocks of a globally synchronized ensemble are captured, wherein the plausibility condition is met, then the length of the interval is given by (t.sup.E−t.sup.B)±2g [see 4, p. 61-62].
[0046] In the local view of the global ticks 0 and 10, the local clocks B and C of the ensemble synchronize to the external reference time of the clock A so as to be again synchronized with the reference time at tick 1 101 and at tick 11 111.
[0047]
[0048] In a real, physical system, an error of less than Ara seconds—the accuracy error of the external time measurement—may occur between the synchronization events, e.g., to the external reference time point 101 or 111 on the timelines 200 and 300. This accuracy error A.sup.ref arises, inter alia, from the different run times and processing times of the time signals of the reference time, and is set forth in the data sheet of the time receiver. With a typical GPS receiver, the accuracy error A.sup.ref of the external time measurement is less than 100 nsec.
[0049] In
[0050] An external event, e.g., the event 500 in
[0051] The behavior of the local clock B is set forth on the timeline 200. The clock derives the perception of time thereof from the oscillation of the local quartz oscillator. The ticks of the timeline 200 0, 1, 2, 3 . . . 8, 9, 10, 11 mark the global ticks from the view of this local clock. The duration of one oscillation of the local quartz oscillator is called the local granularity g of the oscillator. Since the duration of one oscillation of the oscillator of the clock B is slightly longer than specified, the clock B reaches the synchronization point 210 later than the external reference clock A, which has already reached the tenth tick at the time point 110. At the time point 210, the clock B reads the global time of the external reference clock and determines that it is already in the time granule <10,11>. It will shorten the local time granule <10,11> to the length <210,111>, so as to be synchronized with the tick 11 of the reference clock A at tick 11.
[0052] The behavior of the local clock C is set forth analogously on the timeline 300. The ticks 0, 1, 2, 3 . . . 8, 9, 10, 11 on the timeline 300 mark the global ticks of this local clock C. Since the duration of one oscillation of the oscillator of the clock C is slightly shorter than specified, the clock C reaches the synchronization point 310 thereof earlier than the external reference clock A, which will only reach the tenth tick thereof at the time point 110. At the time point 310, the clock C reads the global time of the external reference clock and determines that it is still in the time granule <9,11> of the reference clock. It will shorten the local time granule <10,11> to the length <310,111>, so as to be synchronized with the tick 11 of the reference clock A at tick 11.
[0053] The synchronization of the clock B and the dynamic determination of the HOI (holdover intervals) shall be described in an exact manner hereinbelow. Since, in the external synchronization, the clock of every node computer synchronizes to the global external reference time—represented on the timeline 100—independently of the clock of every other node computer, the operation of the computer node B as described herein is performed by all of the other computer nodes of the ensemble, i.e., also by the computer node C.
[0054] The clock B must again take on the external reference time of the clock A before it deviates by more than the maximum offset O.sup.max
O.sup.max=(f.sup.s.Math.G.sup.glo/2−A.sup.ref−2g.sup.spec)
seconds from the corresponding tick of the clock A. The factor f.sup.g is a safety factor that is between 0.5 and 1, and is typically set to 0.8. The term 2 g.sup.spec the specified granularity of the clock B, takes into consideration the digitization error in the time measurement [4, p. 61] of the external reference time.
[0055] In the example, it is assumed that the clock B contains a quartz oscillator as the oscillation circuit [5]. The duration of one oscillation of the quartz oscillator is determined primarily by the mechanical dimensions of the quartz crystal, and secondarily by the physical environmental conditions of the crystal, such as temperature, air pressure, air humidity, acceleration, electric excitation, and the like [6]. The data sheet of a quartz oscillator makes available the specified granularity of the local clock g.sup.spec, i.e., the nominal duration of one oscillation, and the deviations in this granularity, as expressed in the worst-case drift rate DR.sup.wc of the oscillator within the intended area of use. Typical values for DR.sup.wc are between 10.sup.−3 and 10.sup.−8 seconds/second.
[0056] In the initialization phase, immediately after the clock synchronization is switched on, the start time point t.sup.B of the first HOI is time-stamped with the external reference time, and the length of the first HOI is calculated with the use of the specified worst-case drift rate DR.sup.wc of the local clock according to
HOI=O.sup.max/DR.sup.wc
[0057]
[0058] Then,
N.sup.pl=HOI/g.sub.spec
provides the equation according to which the number of planned ticks N.sup.pl of the local clock in the first HOT is determined. The granularity g.sup.spez of the local clock that is specified in the data sheet is taken as the initial granularity g.sup.vor
g.sup.vor=g.sup.spez
in the first HOI. This completes the initialization.
[0059] The following actions for dynamically calculating the additional HOIs are iterated cyclically.
[0060] At the end of an HOI, the end time point t.sup.E of the just-elapsed HOI is time-stamped with the external time on the axis 100 of
g.sup.d=(t.sup.E−t.sup.B)/N.sup.gez
wherein N.sup.gez sets forth the counted number of ticks in the immediately prior HOI. This mean granularity g.sup.d of the immediately prior HOI is used as the initial granularity of the current HOI. By means of
N.sup.pl=O.sup.max/(g.sup.d−g.sup.vor)
the number of the initially planned ticks N.sup.pl of the local clock in the current HOI is determined, wherein g.sup.vor sets forth the initial granularity of the immediately preceding HOI and where g.sup.d sets forth the mean measured granularity of the immediately prior HOI. The initially planned length of the running HOI is determined according to
HOI=N.sup.pl.Math.g.sup.d
[0061] The granularity g of the local clock B may change during the HOI, due to a change in an environment parameter, e.g., temperature, air pressure, air humidity, acceleration, or the like. Since the environment parameters can be periodically captured with low-cost micro-electro-mechanical system (MEMS) sensors, the granularity of the local clock B is, according to the present invention, periodically adapted to the changed environment parameters.
[0062] The environment parameters of the local clock, e.g., temperature, air pressure, air humidity, and/or acceleration, are measured periodically during the current HOI. The period P for measuring the environment parameters is determined according to
P=O.sup.max/DR.sup.wc
wherein DR.sup.wc represents the specified worst-case drift rate of the oscillator.
[0063] If there is determined to be change in an environment parameter relative to the value at the start of the HOI, then the change in the drift rate DR.sup.Δ, relative to the start of the HOI, is determined with the use of the corresponding drift rate change function DRAF (see
[0064] The drift rate change function DRAF gives the dependence of the drift rate change on a change in an environment parameter. Preferably, a drift rate change function DRAF is known for every environment parameter that is measured. An example of a DRAF is represented in
[0065] By means of g=g.sup.d (1+DR.sup.Δ)
a new current granularity g of the local clock is calculated from the mean granularity g.sup.d of the local clock in the immediately prior HOI and the drift rate change DR.sup.Δ.
[0066] When there is a change in drift rate DR.sup.Δ, the value of the current HOI.sup.akt is also determined anew according to
HOI.sup.akt=min{HOI,[O.sup.max/(|DR.sup.Δ|],HOI.sup.st}
[0067] The term HOI.sup.st sets forth the maximum length of the HOI, which can be derived from the stochastic drift rate DR.sup.st according to HOI.sup.st=O.sup.max/DR.sup.st.
[0068] The concrete value of the stochastic drift rates depends on the accuracy and the frequency of measurement of the environment parameters [6], and must be determined within the context of the system analysis. The range of values for DR.sup.st is between 10.sup.−5 and 10.sup.−12. In the following example (table 2), a value of 10.sup.−6 is assumed.
[0069] If the granularity g of the local clock is always changing, the number of ticks of the local clock in the global time granule G.sup.glo must be determined anew according to
N.sup.glo=G.sup.glo/g
[0070] During the operation of the node computer B, the captured functional dependence between the environment parameters observed in operation and the drift rate is saved in an environmental data bank. The assessment of this environmental data bank with methods of big data analytics leads to adaption of the drift rate change functions DRAF to the quartz oscillator used in the node computer B.
[0071] One or more of the following time signal sources may be used as an external time reference. [0072] The GPS signal [0073] The GLONASS signal [0074] The GALILEO signal [0075] The longwave time signal DCF77 [0076] The longwave time signal e-LORAN
[0077] The described synchronization method can be realized with a device that comprises a microcomputer having a CPU and storage unit, a receiver for an external reference time signal, a quartz oscillator, a communication interface for wirelessly transmitting messages, and environmental sensors for measuring the environmental conditions of the quartz oscillator. The device may contain, as environmental sensors, a sensor for capturing the temperature and/or a sensor for measuring the air pressure and/or a sensor for measuring the air humidity and/or a sensor for measuring the acceleration.
[0078] Such a device may be used as a compact PTP Grandmaster Clock, according to the IEEE 1588 Clock Synchronization Standard. The device may also contain a receiver for a plurality of the aforementioned external reference time signals, in order to be able to tolerate the failure of a signal.
[0079] Table 2 shows a concrete example of how the holdover interval HOI may change during the operation of a computer node.
[0080] The example shows that the distance between two synchronization time points is substantially increased by the dynamic determination of the HOIs (cf. lines 9 and 20), and, as a result, the number of the synchronization events and the associated energy expenditure for the synchronization are significantly reduced. The change in the ambient temperature of the local clock from 25° C. to 40° C. leads to such a substantial change in the drift rate of the local time that the HOI must be shortened.
TABLE-US-00002 TABLE 2 Example for the calculation of the HOI Abr Data source Example 1 G.sup.glo System specification 100 μsec 2 f.sup.s Presumption of safety 0.8 3 A.sup.ref GPS receiver 50 nsec 4 g.sup.spec g.sup.spec from the oscillator data 0.1 μsec sheet 5 g.sup.vor g.sup.spec 0.1 μsec 6 |DR.sup.wc| Oscillator data sheet 0.0005 7 |DR.sup.st| Measurement of the 0.000001 environmental parameters 8 O.sup.max (f.sup.s .Math. G.sup.glo/2 − A.sup.ref − 2 g.sup.spec) 39.750 μsec 9 HOI O.sup.max/DR.sup.wc 79 500 μsec 10 N.sup.pl HOI/g.sup.spec 795000 11 t.sup.E − t.sup.B Reference time measurement 79508 μsec 12 N.sup.gez Measurement 795002 13 g.sup.d (t.sup.E − t.sup.B)/N.sup.gez 0.100009811 μsec 14 N.sup.pl O.sup.max/(g.sup.d − g.sup.vor) 4 051 575 15 HOI N.sup.pl .Math. g.sup.d 405197 μsec 16 t.sup.E − t.sup.B Reference time measurement 405194 μsec 17 N.sup.gez Measurement 4 051 574 18 g.sup.d (t.sup.E − t.sup.B)/N.sup.gez 0.100009034 μsec 19 N.sup.pl O.sup.max/(g.sup.d − g.sup.vor) 51 125 402 20 HOI N.sup.pl .Math. g.sup.d 5 113 018 μsec 21 DR.sup.Δ Temperature measurement 0.00001 40° C. 22 P O.sup.max/DR.sup.wc 79 500 μsec 23 g.sup.d (1 + DR.sup.Δ) 0.1000105 μsec 24 HOI.sup.st [O.sup.max/(|DR.sup.st|] 39 7500 000 μsec 25 HOI.sup.akt min{HOI, [O.sup.max/(|DR.sup.Δ|], HOI.sup.st} 3 975 000 μsec
CITED LITERATURE
[0081] [1] U.S. Pat. No. 5,864,315 [0082] [2] U.S. Pat. No. 7,535,417 B2 [0083] [3] US 2012/0146850 A1 [0084] [4] Kopetz, H. Real-Time Systems, Design Principles for Distributed Embedded Applications. Springer Verlag. 2011. [0085] [5] Shmaliy, Y. et al. Efficient Predictive Estimator for Holdover in GPS-based clock synchronization. IEEE Trans. on Ultrasonics, Ferroelectrics and Frequency Control. Vol 55. No. 10. pp. 2131-2139. 2008. [0086] [5] Vig, J. R. Introduction to Quartz Frequency Standards. Report SLCET-TR-92-1 US Army Laboratory Command Fort Monmouth, N.J. USA [0087] [6] Walls, F. L. Fundamental Limits on the Frequency Stability of Quartz Oscillator. IEEE Trans. on Ultrasonics, Ferroelectrics and Frequency Control. Vol 42. No. 4. pp. 576-589. 1995.