*3.2. Advanced Synchronization Algorithm*

If the master manipulator *M1* (or slave manipulator *MSi*) activity change has a global character (endpoint movement speed increasing/decreasing), then it is possible to indicate this change using variable *D*. This variable represents the percentage proportion deviations among operation durations of

master and slave manipulators, where *Di*,*<sup>j</sup>* ∈ *D* = ⎧ ⎪⎪⎪⎨ ⎪⎪⎪⎩ *D*2,1 ... *D*2,*<sup>m</sup>* ... ... ... *Dn*,1 ... *Dn*,*<sup>m</sup>* ⎫ ⎪⎪⎪⎬ ⎪⎪⎪⎭ is calculated based on Equation (2).

*Di,j* = (1 − (*Ti,j*/*T1,j*)) × 100 (2)

The variable *D* is calculated in each step of the algorithm, but is only usable from the second production cycle. The first production cycle has diverse values of deviations *Di,j*, from first step of second cycle, *Di,j* within defined tolerance represent synchronized state. Every change of *Di,j* values exceeding the limit can be considered as a desynchronization indicator.

If two (or another specified number *d*) differences *Di,j-(d*−*1)* ... *Di,j* of consecutive operations *Oj-(d*−*1)* ... *Oj* are sufficiently similar based on the similarity threshold *Dratio\_limit* (Equation (3))

(|(1 − (*Di,j*−*1*/*Di,j*))| × 100 < *Dratio\_limit*) ∧ ... ∧ (|(1 − (*Di,j-(d*−*1)*/*Di,j-(d*−*2)*))| × 100 < *Dratio\_limit*) (3)

and this difference exceeds the given threshold of change *Dlimit* (Equation (4)),

$$|D\_{i,j}| > D\_{limit} \tag{4}$$

then advanced synchronization coefficient *Ki* (Equation (5)) is applied to all other operation execution speeds *Vi,j*, except the actual operation (which is already adjusted in this step) and previous *d* − 1 values (which were adjusted in previous *d* − 1 steps).

$$K\_i = 1 - \left( \left( \frac{1}{d} \sum\_{z=0}^{d-1} D\_{i, j-z} \right) / 100 \right) \tag{5}$$

Both algorithms were designed for (theoretically) endless repetition of production cycle. The above-mentioned previous values of the current *Di,j* in the initial steps of every cycle are based on an endless loop of variable *j*. For example, in the case of 10 operations in one production cycle, after the initialization cycle, the previous two elements *V2,j* (endpoint speed of slave manipulator *M2*) to element *V2,1* are *V2,10* and *V2,9*.

The synchronization algorithm with a feedforward reaction to the general change of the master manipulator *M1* (or slave manipulators *MSi*) endpoint movement speed is identical for every slave manipulator *MSi* and is depicted in Figure 3.


**Figure 3.** Advanced algorithm for synchronization of robotic cell operations.
