Overview

Due to the increasing use of decentralised controllers, time synchronisation of different systems is becoming an increasingly important issue. In systems without identical timebase, cyclic transfer of information can lead to beat effects, which can manifest themselves as periodic disturbance in the synchronisation of drives for which axis information is transferred via a network. The TcRemoteSync.lib library offers options for general time synchronisation of information in distributed systems, and special techniques for synchronising NC axes ("distributed axes").

 

The problem

Notwithstanding nominally identical task cycle times, different systems will have a small phase difference (drift) that is caused by differences in production, different temperature characteristics and different environmental conditions of the oscillators used. The phase difference causes a continuous change in the temporal interrelationship of the system task cycles. Figure 1 shows the situation in schematic form. The sending system S and the receiving system R operate with slightly different cycle times T. TS >TR for the case shown. The phase difference causes a shift in the task cycles of the two systems. Periodically, two cycles of system R will occur during one cycle of system S. This situation is indicated by a circle in Figure 1.

Overview 1:
Figure 1: Change in the temporal interrelationship between the task cycles of two systems S and R with slightly different cycle times (TS>TR).

Distributed systems are synchronized through cyclic sending of information from the sender (S) to the receiver (R). Up to the point indicated in Figure 1 the sent information is receive sequentially, then the information sent is read during two consecutive cycles, and subsequently the system returns to sequential reception. If the cycle time relationship is reversed (i.e. cycle time TR > cycle time TS), information sent would be missed on the receiver side.

 

The solution

If there is no option for physically synchronizing the cycle times of the systems, e.g. for two PCs operated with SERCOS cards, beat effects can be compensated through correction of the information received. The required correction time Δt is determined from the drift of the two systems such that the corrected data S' correspond to temporally equidistant and sequential reception. Figure 2 shows the time response of the original data S to receiver R, and data S' corrected by the correction time Δt. At the point indicated with a circle, the data originally read identically by two receiver cycles are initially corrected with Δt1 for the first receiver cycle and subsequently with Δt2 for the second cycle.

Overview 2:
Figure 2: Corrected information S' after extrapolation of the originally sent information S with correction time Δt. The sign and magnitude of the time correction are indicated by arrows.

In order to be able to correct the data, the variation of the information over time must be known. For the typical application of synchronization of distributed NC axes, for example, set position and velocity can be corrected through extrapolation with the set velocity and acceleration.

 

Application example

A typical application for the synchronization of distributed systems would be operation of interpolating or coupled NC axes (e.g. master/slave coupling) on different computers ("distributed axes"). Step changes in the set values of the position and velocity caused by duplicate reading or missed information lead to periodic malfunction. Figure 3 shows the actual velocity of a drive operated directly with the received set position (position interface). The disturbances are caused by step changes in the received set positions.

Overview 3:
Figure 3: Actual velocity of an axis operated directly with received set values in the position interface.

The set position can be corrected in the receiver system prior to drive control commands being issued using the method described above. To this end the received set position pS is extrapolated with the correction time Δt and the received set velocity vS to set position pS'. Optionally, the set acceleration aS can be used for the extrapolation. The following applies: pS'=pS+Δt*vS(+0.5*Δt2as). Figure 4 shows the actual velocity of the axis driven with the corrected set position pS'. The disturbances shown in Figure 3 are no longer present.

Overview 4:
Figure 4: Actual velocity of an axis operated with corrected set values in the position interface.

 

Functions offered by library TcRemoteSync.lib

For synchronising distributed systems, the functionality implemented in the TcRemoteSync.lib library can be used. The following function blocks are used in the receiver system:

The function block FB_AxisSync is used for axes synchronisation via a network. The set position and, if necessary, the set velocity of the axis information sent, are extrapolated as outlined above. An example is available for demonstration purposes. Internally FB_AxisSync uses two function blocks, FB_TimeSync and FB_AxisExtrapolateValues. The block FB_TimeSync is used for determining the beat frequency and for calculating the correction time Δt, FB_AxisExtrapolateValues extrapolates the set values received with the correction time.