Timing: Part 12 - Synchronizing Clocks Remotely

In digital television broadcasting, what matters is that the pictures should be displayed at the correct frame rate and lip-sync should be achieved in an isochronous system.

If that happens along with a certain constant amount of delay between the timing of the transmitter and the receiver, it's not a big deal.

However, some systems cannot tolerate such a delay and require clocks that are truly synchronous rather than just isochronous. Single frequency networks as used in DAB are a good example.

Is synchronism actually possible? It is necessary to consider what information theory says. It is not possible to have synchronous delivery of information because information travels at finite speed. The speed is bounded by the speed of light and all real transmission systems will be slower than that. So a zero delay transmission over distance isn't possible.

However, if we carefully consider the characteristics of a clock, we find that it actually contains no information. A clock is simply a constant frequency and from information theory we can deduce that a constant frequency has no bandwidth. From mathematics we see it has constant angular velocity and hence stationary statistics. From compression theory we see that every cycle looks exactly the same as the one before, so the receiver already knows what it looks like.

The clock is just a constant frequency and it is conventional to divide the frequency down in order to display the time. This is true of all clocks. In a traditional mechanical clock, the swinging of the pendulum is divided down to turn the hands. In an electronic system, the clock frequency is divided down using a counter. If the frequency is correct but the state of the count is incorrect, the clock is running at the correct rate, but showing the wrong time.

Many years ago, it was the norm to set a clock from a sundial. Such a clock would be showing local solar time. A second clock at a different longitude would show a different time; four minutes difference for every degree of longitude. The two clocks would be isochronous, relying on the same mechanism, namely the motion of the Earth and the Sun. It was perfectly possible to compensate for the time difference. If the longitude difference between two clocks was known, one of them could be shifted with respect to the sundial so they both showed the same time.

That is the idea behind Greenwich Mean Time. A clock east or west of Greenwich can be set to show the same time as Greenwich if the local mean time is offset according to the longitude. Later, as technology developed, the clocks could be synchronized using electrical signals that were almost instantaneous.

From the above it follows that two or more remote clocks can have the same rate if they use the same reference and can display the same time if steps are taken to compensate the propagation time between them. The two clocks and their sundials form a simple case, because their locations are known.

We can also obtain time from the GPS system. Finding location from GPS depends upon knowing the time of flight of transmissions from the satellites to the receiver. This requires the receiver to know the time and then using three satellites it can figure out the location in three dimensions. However, if the receiver doesn't know the time it can figure it out using four satellites to calculate four unknowns, x,y,z and t.

In some cases GPS reception is not available and a different solution has to be found.

In digital television, a TV set has recreated a 27MHz clock and is delivering isochronous TV pictures having some constant delay with respect to the transmitter. If the transmitter sends the time, it will be wrong when it appears on the screen because of that delay. If we wanted to put it right, we need to measure that delay. Digital television doesn't need to do that and doesn't have the means, but other systems, such as PTP (precision time protocol) do.

Fig.1 shows the approach to synchronizing clock B to Clock A. If Clock A sends a message to Clock B containing a time stamp, which is a sample of the Clock A counter, the message takes some time to arrive and so the time in the time stamp will be incorrect. In order to make the two clocks synchronous rather than just isochronous, it is necessary to measure that propagation time and to compensate for it. That requires two-way communication of some kind between the two clocks.

Figure 1 - Clock B needs to know the propagation delay from Clock A. The round trip from T1 to T4 contains two propagation delays plus the response time of Clock A, which is sent to B. By taking out the response time, Clock B can compute the propagation delay.

Figure 1 - Clock B needs to know the propagation delay from Clock A. The round trip from T1 to T4 contains two propagation delays plus the response time of Clock A, which is sent to B. By taking out the response time, Clock B can compute the propagation delay.

Each remote clock, B in this case, has to work out the propagation time for itself, but with the help of the Clock A. Clock B sends a message to Clock A and records the time T1 it was sent according to its own B timing. When clock A receives the message, it creates a time stamp T2 according to A timing. Clock A subsequently sends a message back to Clock B. It may not be able to do so immediately, because it may be dealing with a number of other messages.

At some point Clock A gets around to replying to Clock B. It includes two time stamps. One is T2, the state of Clock A at the instant of reception of the message from Clock B, the other is T3, the state of Clock A at the instant of transmission. This message arrives at Clock B with a propagation delay as shown and generates a time stamp T4 in Clock B time.

Clock B knows when it originated the message and when the reply arrived, in its own time frame. The difference between those times is the round trip time, T4 - T1, which is longer than the two propagation delays because Clock A took a finite time to respond. The difference between the two time stamps received from Clock A reveals the response time T3 - T2 and Clock B can subtract that from the round trip time to get the total propagation delay, which is (T4 - T1) - (T3 - T2).

At this point some assumptions have to be made. One of these is that the two clocks are not in relative motion. However, the most significant assumption is that the propagation delay in both directions is the same and that the delay in the timing of A reaching B is one half the total propagation delay. In practice that may not be true and the result will be a systematic error. The communication path between A and B may suffer from jitter, so that individual propagation delay estimates may differ.

Clock B divides the total propagation delay by two and adds the result to T3. If the clocks are synchronous, the result will be T4. If there is a timing error between the two clocks, the result will me more or less than T4 and the timing of Clock B can be adjusted.

Various refinements have been found as the mechanism has evolved. For example, Clock B will not update its own time as the result of a single transaction with Clock A, but may use a filtered version of many transactions. The filtering may be non-linear such that atypical measurements, know as outliers, are ignored. Clock B is not constrained to Clock A and can look for synchronizing information elsewhere.

That then introduces another problem. When many sources of synchronization are available the question arises about which one to believe. The remote clocks themselves may be reliable, but the communication paths from them may be less so. Gathering a number of time stamps over a period allows a statistical distribution of the estimated propagation delay to be established. A timing source with a narrower distribution could be more reliable

When we describe clocks that are physically separated as synchronous, we are describing how we would like them to be. Relativistic effects and the finite precision of our equipment will conspire to ensure that they are not perfect. Strictly speaking, even if our synchronizing system is perfect and Clock A and Clock B are truly synchronous, they will only appear synchronous to points that are reached from A and B by way of equal delays. At all other points synchronism will be lost. That follows directly from relativity and there is nothing to be done about it.

But the art of engineering is to solve problems, and many problems can be solved without perfection. All that matters is that any solution offered exceeds or at least meets expectations, and an imperfect solution may do that, as well as being a whole lot better than no solution.

You might also like...

Designing IP Broadcast Systems - The Book

Designing IP Broadcast Systems is another massive body of research driven work - with over 27,000 words in 18 articles, in a free 84 page eBook. It provides extensive insight into the technology and engineering methodology required to create practical IP based broadcast…

Demands On Production With HDR & WCG

The adoption of HDR requires adjustments in workflow that place different requirements on both people and technology, especially when multiple formats are required simultaneously.

If It Ain’t Broke Still Fix It: Part 2 - Security

The old broadcasting adage: ‘if it ain’t broke don’t fix it’ is no longer relevant and potentially highly dangerous, especially when we consider the security implications of not updating software and operating systems.

Standards: Part 21 - The MPEG, AES & Other Containers

Here we discuss how raw essence data needs to be serialized so it can be stored in media container files. We also describe the various media container file formats and their evolution.

NDI For Broadcast: Part 3 – Bridging The Gap

This third and for now, final part of our mini-series exploring NDI and its place in broadcast infrastructure moves on to a trio of tools released with NDI 5.0 which are all aimed at facilitating remote and collaborative workflows; NDI Audio,…