Hubbry Logo
Clock driftClock driftMain
Open search
Clock drift
Community hub
Clock drift
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Clock drift
Clock drift
from Wikipedia

Clock drift refers to several related phenomena where a clock does not run at exactly the same rate as a reference clock. That is, after some time the clock "drifts apart" or gradually desynchronizes from the other clock. All clocks are subject to drift, causing eventual divergence unless resynchronized. In particular, the drift of crystal-based clocks used in computers requires some synchronization mechanism for any high-speed communication. Computer clock drift can be utilized to build random number generators. These can however be exploited by timing attacks.

In non-atomic clocks

[edit]

Everyday clocks such as wristwatches have finite precision. Eventually they require correction to remain accurate. The rate of drift depends on the clock's quality, sometimes the stability of the power source, the ambient temperature, and other subtle environmental variables. Thus the same clock can have different drift rates at different occasions.

More advanced clocks and old mechanical clocks often have some kind of speed trimmer where one can adjust the speed of the clock and thus correct for clock drift. For instance, in pendulum clocks the clock drift can be manipulated by slightly changing the length of the pendulum.

A quartz oscillator is less subject to drift due to manufacturing variances than the pendulum in a mechanical clock. Hence most everyday quartz clocks do not have an adjustable drift correction.

Atomic clocks

[edit]

Atomic clocks are very precise and have nearly no clock drift. Even the Earth's rotation rate has more drift and variation in drift than an atomic clock due to tidal acceleration and other effects. The principle behind the atomic clock has enabled scientists to re-define the SI unit second in terms of exactly 9192631770 oscillations of the caesium-133 atom. The precision of these oscillations allows atomic clocks to drift roughly only one second in a hundred million years; as of 2015, the most accurate atomic clock loses one second every 15 billion years.[1][2] The International Atomic Time (TAI) time standard and its derivatives (such as the Coordinated Universal Time (UTC)) are based on weighted averages of atomic clocks worldwide.

Relativity

[edit]

As Einstein predicted, relativistic effects can also cause clock drift due to time dilation. This is because there is no fixed universal time, time being relative to the observer. Special relativity describes how two clocks held by observers in different inertial frames (i.e. moving with respect to each other but not accelerating or decelerating) will each appear to either observer to tick at different rates.

In addition to this, general relativity gives us gravitational time dilation. Briefly, a clock in a stronger gravitational field (e.g. closer to a planet) will appear to tick more slowly. People holding these clocks (i.e. those inside and outside the stronger field) would all agree on which clocks appear to be going faster.

It is time itself rather than the function of the clock which is affected. Both effects have been experimentally observed.[citation needed]

Time dilation is of practical importance. For instance, the clocks in GPS satellites experience this effect due to the reduced gravity they experience (making their clocks appear to run more quickly than those on Earth) and must therefore incorporate relativistically corrected calculations when reporting locations to users. If general relativity were not accounted for, a navigational fix based on the GPS satellites would be false after only 2 minutes, and errors in global positions would continue to accumulate at a rate of about 10 kilometers each day.[3]

Random number generators

[edit]

Computer programs often need high quality random numbers, especially for cryptography.[4] There are several similar ways clock drift can be used to build random number generators (RNGs).

One way to build a hardware random number generator is to use two independent clock crystals, one that for instance ticks 100 times per second and one that ticks 1 million times per second. On average the faster crystal will then tick 10,000 times for each time the slower one ticks. But since clock crystals are not precise, the exact number of ticks will vary. That variation can be used to create random bits. For instance, if the number of fast ticks is even, a 0 is chosen, and if the number of ticks is odd, a 1 is chosen. Thus such a 100/1000000 RNG circuit can produce 100 somewhat random bits per second. Typically such a system is biased—it might for instance produce more zeros than ones—and so hundreds of somewhat-random bits are "whitened" to produce a few unbiased bits.

There is also a similar way to build a kind of "software random number generator". This involves comparing the timer tick of the operating system (the tick that usually is 100–1000 times per second) and the speed of the CPU. If the OS timer and the CPU run on two independent clock crystals the situation is ideal and more or less the same as the previous example. But even if they both use the same clock crystal the process/program that does the clock drift measurement is "disturbed" by many more or less unpredictable events in the CPU such as interrupts and other processes and programs that run at the same time. Thus the measurement will still produce fairly good random numbers.

Most hardware random number generators such as the ones described above are fairly slow. Therefore, most programs only use them to create a good seed that they then feed to a pseudorandom number generator or a cryptographically secure pseudorandom number generator to produce many random numbers fast.

Timing attack

[edit]

In 2006, a side channel attack was published[5] that exploited clock skew based on CPU heating. The attacker causes heavy CPU load on a pseudonymous server (Tor hidden service), causing CPU heating. CPU heating is correlated with clock skew, which can be detected by observing timestamps (under the server's real identity).

See also

[edit]

References

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
Clock drift refers to the gradual and systematic deviation of a clock's timekeeping from the true or reference time, caused by inherent inaccuracies in the clock's mechanism that lead it to run either slightly faster or slower than intended. This phenomenon is distinct from clock jitter, which involves random, short-term fluctuations in timing, whereas drift accumulates predictably over time due to factors like imperfect construction tolerances in oscillators. In physical clocks, such as quartz crystal oscillators commonly used in computers and consumer devices, drift arises from environmental influences including temperature variations, vibrations, and acoustic noise, which alter the oscillation frequency and cause the clock to lose or gain time at rates of approximately per day. More precise atomic clocks, based on cesium-133 transitions, exhibit far lower drift rates—about every 150 million years—yet still suffer from effects like stray electromagnetic fields, gravitational influences, and atomic motion relative to fields. In environments, individual system clocks, each driven by separate timers, drift independently at relative rates up to around 10⁻⁵ (or 0.001%), influenced by factors such as changes, leading to progressive divergence between clocks. The effects of clock drift are significant across various domains, compromising accuracy in time-sensitive applications; for instance, uncorrected drift in GPS systems can introduce positional errors of up to 10 kilometers per day without relativistic adjustments. In operating systems and real-time embedded devices, such as stepping motor controls or spacecraft operations, drift disrupts , potentially causing failures in event ordering, data logging, or coordinated actions. Distributed systems face compounded issues, where the maximum drift between two clocks can reach twice the individual relative error, necessitating frequent resynchronization—such as every half hour for a 10⁻⁵ drift rate—to maintain agreement within bounds like 4 milliseconds per hour. To mitigate clock drift, techniques like external time servers are employed; for example, Cristian's algorithm allows a client to adjust its clock by querying a and compensating for network round-trip delays, while the Berkeley algorithm averages offsets from multiple machines to derive a coordinated time. Advanced optical atomic clocks, with drift rates as low as 1 second in 15 billion years, further minimize errors and support applications in telecommunications, power grids, and scientific research, such as detecting or imaging black holes.

Definition and Fundamentals

Definition

Clock drift refers to the gradual deviation of a clock's indicated time from a reference standard, such as true or (UTC), manifesting as a progressive loss or gain of time. This occurs because no clock oscillator operates at precisely the nominal indefinitely, leading to cumulative errors in timekeeping. The drift rate quantifies this inaccuracy, commonly expressed in seconds per day (s/day) for practical timepieces or parts per million (ppm) for high-precision oscillators, representing the average discrepancy per unit of reference time. For instance, a drift rate of 1 s/day means the clock accumulates an error of one second every 24 hours relative to the standard. Clock drift encompasses two primary types: systematic drift, which is predictable and arises from deterministic influences like environmental factors or design limitations that can be modeled, and random drift, which involves unpredictable fluctuations due to processes such as thermal noise in the oscillator. Systematic drift allows for compensation through , whereas random drift contributes to inherent that limits long-term accuracy. These distinctions are critical for understanding clock performance in applications ranging from consumer devices to scientific instruments. The phenomenon of clock drift has roots in early mechanical timekeeping efforts. In the , observed and addressed drift in his pioneering , patented in , which reduced daily errors to approximately 15 seconds— a vast improvement over prior spring-driven clocks that drifted by several minutes per day—thereby establishing foundational awareness of timekeeping inaccuracies. The fractional drift δ\delta is formally defined by the formula δ=TmeasuredTtrueTtrue,\delta = \frac{T_{\text{measured}} - T_{\text{true}}}{T_{\text{true}}}, where TmeasuredT_{\text{measured}} is the time interval recorded by the drifting clock and TtrueT_{\text{true}} is the corresponding interval according to the reference standard. This expression yields the relative time error, which, for steady-state conditions, approximates the oscillator's fractional frequency offset and serves as a basis for drift rate estimation.

Causes

Clock drift arises primarily from inherent inaccuracies in the timekeeping mechanisms of clocks and oscillators, where manufacturing tolerances introduce variations in the nominal frequency of the oscillator, leading to an initial offset from the ideal value. These production imperfections, such as inconsistencies in component fabrication, result in fractional frequency deviations that set the baseline for long-term instability across various clock types. Aging effects further contribute to drift through the gradual degradation of key components, including changes in material properties like lattices or atomic transition stabilities, causing a systematic shift in over time. This internal evolution, often modeled as a linear or of time, manifests as a predictable yet cumulative that accumulates with operational duration. Power supply fluctuations represent a universal contributor to clock drift, affecting performance irrespective of the specific technology by introducing and systematic frequency perturbations through variations in supply voltage that alter the electronic circuits driving the oscillator. Mechanical wear, on the other hand, contributes in clocks with , such as mechanical timepieces, through physical degradation or stress that exacerbates instability via induced vibrations or component fatigue. Temperature-induced frequency shifts provide a prominent example of environmental influence on drift, where changes in ambient alter the oscillator's resonant according to the relation Δf/f=αΔT\Delta f / f = \alpha \Delta T, with α\alpha denoting the , Δf/f\Delta f / f the relative change, and ΔT\Delta T the variation. This highlights how even modest thermal fluctuations can propagate into measurable time errors over extended periods.

Measurement and Correction

Clock drift is quantified by comparing the frequency or phase of the clock under test against a high-precision reference standard, such as (UTC) or (GPS) signals. This comparison often employs beat frequency analysis, where the output signals from the two clocks are mixed to produce a low-frequency beat note representing their difference; the characteristics of this beat signal, including its frequency offset and , reveal the extent of drift over time. Such techniques enable precise measurement of fractional frequency deviations as small as parts per billion (ppb) in laboratory settings. A key metric for characterizing clock stability and drift is the Allan variance, denoted as σy2(τ)\sigma_y^2(\tau), which assesses the variance of the average fractional frequency differences over adjacent time intervals of length τ\tau. The estimator is given by σy2(τ)=12(K1)i=1K1(yˉi+1yˉi)2,\sigma_y^2(\tau) = \frac{1}{2(K-1)} \sum_{i=1}^{K-1} \left( \bar{y}_{i+1} - \bar{y}_i \right)^2, where KK is the number of adjacent fractional frequency averages over intervals of duration τ\tau, and yˉi\bar{y}_i is the average fractional frequency over the ii-th interval. Developed by David W. Allan in 1966, this two-sample variance is particularly effective for distinguishing between different noise types (e.g., white phase noise versus flicker frequency noise) that contribute to drift, providing a plot of σy(τ)\sigma_y(\tau) versus τ\tau that highlights optimal averaging times for stability. In atomic clock ensembles used to maintain (TAI), guides the weighting of individual clocks to minimize overall drift. Correction of clock drift typically involves periodic to external references or hardware-based adjustments to counteract observed offsets. The Network Time Protocol (NTP), standardized in RFC 958 and subsequent updates, facilitates software-based over IP networks by exchanging timestamps between clients and servers, estimating round-trip delays, and applying corrections to adjust the local clock rate and offset, achieving accuracies of milliseconds to microseconds depending on network latency. For finer control, voltage-controlled oscillators (VCOs) or voltage-controlled crystal oscillators (VCXOs) are employed in hardware, where an applied control voltage modulates the oscillator's frequency to compensate for drift; for instance, a varactor diode integrated into the crystal circuit allows pulling the frequency by tens to hundreds of parts per million (ppm). These methods are combined in systems like quartz-based timepieces, where feedback loops periodically recalibrate against a reference to sustain long-term accuracy. A pivotal historical advancement in drift correction occurred with the development of quartz watches in the late 1960s, exemplified by Seiko's Astron model in 1969, which utilized a quartz crystal oscillator to achieve accuracies on the order of 5 seconds per month—equivalent to roughly 2 ppm—vastly improving upon mechanical watches and enabling practical ppm-level corrections through temperature compensation and periodic adjustments.

Drift in Clock Technologies

Non-Atomic Clocks

Non-atomic clocks, such as mechanical and quartz-based timepieces, exhibit clock drift primarily due to environmental influences and material properties, leading to deviations from true time that require periodic adjustments. In mechanical clocks, the oscillating mechanisms are particularly susceptible to external factors like and , resulting in typical monthly drifts on the order of 10 to 100 seconds. These clocks rely on macroscopic physical oscillations, contrasting with the superior long-term stability of atomic clocks, which can maintain accuracy to within a second over millions of years. Mechanical clocks, including pendulum and designs, experience drift from variations in and structural changes. Pendulum clocks are affected by gravitational tides, which cause periodic fluctuations in the effective , altering the pendulum's period by up to approximately 0.0002 seconds diurnally. More significantly, temperature-induced length changes in the pendulum rod expand or contract the swing path; for instance, uncompensated pendulums slow down as materials lengthen in higher temperatures, contributing to overall drift rates of several seconds per day in non-temperature-compensated systems, while compensated systems using reduce this to several seconds per month. In wristwatches, the and hairspring mechanism is vulnerable to magnetism, where exposure to magnetizes components, causing the hairspring to adhere to itself, shorten, and increase , which can accelerate the rate by minutes per day if severe. Quartz clocks utilize a vibrating crystal as the oscillator, offering improved stability around 0.001% (10 parts per million) accuracy under controlled conditions, though real-world drift reaches up to 15 seconds per month due to factors like . occurs when the crystal's frequency response differs during heating and cooling cycles, preventing exact replication of the frequency- curve and introducing offsets. The fundamental resonant frequency of the crystal in thickness-shear mode is approximated by
f=12hμqρqf = \frac{1}{2h} \sqrt{\frac{\mu_q}{\rho_q}}
Add your contribution
Related Hubs
User Avatar
No comments yet.