A hierarchical synchronization method and a tele¬ communications system employing message-based synchronization
The invention relates to a hierarchical syn¬ chronization method for a telecommunications system employing message-based synchronization and comprising a plurality of nodes interconnected by transmission lines, wherein the nodes interchange signals contain- ing synchronization messages with information on the priority of the respective signal in the internal synchronization hierarchy of the system, and the node enters into a predetermined standard state for a preset time period in a change situation, such as a failure situation, in order to prevent the selection of faulty synchronization messages.
The invention also relates to a telecommunica¬ tions system employing message-based synchronization and comprising a plurality of nodes interconnected by transmission lines, the nodes interchanging signals containing synchronization messages with information on the priority of the respective signal in the internal synchronization of the system, and the node entering into a predetermined standard state for a preset time period in a change situation, such as a failure situation, in order to prevent the selection of faulty synchronization.
As used in the text below, the term node refers to a junction point between transmission lines in a system. A node may be any device or equipment capable of affecting clock synchronization, such as a branch¬ ing or cross-connection means.
Nodes in a system utilizing message-based syn¬ chronization are interconnected by transmission lines which the nodes use for data transmission. These lines
also forward the clock frequency of the transmitting party to the receiving party. Each node selects the frequency of a signal from a neighbouring node or the frequency of its own internal clock source as the source of its own clock frequency. In order that all nodes in the system would operate at the same clock frequency, one usually attempts to make the system to synchronize itself with a single clock source called a master source. All system nodes connected directly to the selected master source are thus synchronized with the master source while nodes connected to the nodes adjacent to the master source but not directly connected to the master source are synchronized with these adjacent nodes. Accordingly, each node at a greater distance from the master source synchronizes itself with a node one node spacing closer to the master source.
In order that the above-described synchroniza¬ tion hierarchy could be established within the system, the system nodes interchange synchronization messages. These messages contain information by means of which individual nodes are able to select a timing source. The system nodes are prioritised and the system tends to synchronize itself with the clock frequency of a node having the "highest level of priority. Normally each priority level is assigned to a single system node. Synchronization messages normally contain information about the origin of the clock frequency of the node transmitting the message and the priority of the node as well as a value describing the quality of the clock signal. Accordingly, a neighbouring node clock frequency which originates from a desired node and which is of the highest quality can be selected by an individual node as the source of its own clock fre- quency. At the system start-up each node selects its
own internal clock source as the source of its clock frequency as it has not yet processed any incoming synchronization messages. After the node has processed the first incoming synchronization messages, it selects the clock frequency of a neighbouring node having the highest level of priority as the source of its clock frequency. After all messages have been distributed over the system and the system has achieved a stable state as far as synchronization is concerned, the system has been synchronized hier¬ archically with the clock frequency of the master source.
Figure 1 shows a system utilizing message-based synchronization in a stable situation. Priorities assigned to the nodes are indicated by numbers within the circles representing the nodes. The smaller the number, the higher the priority of the node. Syn¬ chronization messages transmitted by a node n (n = 1...6) are indicated by the reference MSGn. Synchron- ization messages transmitted by different nodes usual¬ ly differ from each other and depend on the applied message-based synchronization method. The distribution of the clock frequency from the master clock (node 1) to the other system nodes is illustrated by solid lines. Internodal connections drawn by broken lines are not used in a normal situation for system syn¬ chronization, but they are available in change situations.
Message-based synchronization is based on a simple principle that the user defines the synchron¬ ization hierarchy of the nodes by assigning each node a dedicated signature indicating the hierarchical level of the node and the system synchronizes itself with the defined master clock independently by util- izing, if required, all existing internodal con-
nections (cf. Figure 1). If the connection to the master clock breaks, and no alternative connection exists, or if the master clock fails, the system synchronizes itself with a node of the next highest level of hierarchy. Figure 2 shows a situation where the master clock fails in the system according to Figure 1. Response to the change in synchronization takes place by message interchange between nodes. When the timing source of the node fails, the synchroniza- tion hierarchy is reestablished beginning from the point of break (away from the master device of the system). This takes place e.g. in such a manner that the node that detects the break first enters into a state of internal timing for a preset time period and then forwards information about the change. When the next node detects the changed situation, it also enters into a state of internal timing for a preset time period and forwards information about the change, etc. After the expiry of the preset time periods of the individual nodes, the reestablishment of the syn¬ chronization hierarchy starts. The resulting hierarchy is usually similar to the original hierarchical struc¬ ture where the failed connection is replaced with an operative one while the structure otherwise remains nearly unchanged.
A network utilizing message-based synchroniza¬ tion is described e.g. in US Patents 2,986,723 and 4,837,850. Both patents disclose methods in which time periods depending on the size and configuration of the system are used in the case of system failures. During the time periods the nodes are in a predetermined forced standard state in order to prevent in¬ appropriate synchronization in failure situations. Information about of the failure is forwarded as described above by using the messages of the system.
After information about the changed situation has been distributed throughout the system or over a suffi¬ ciently large area, the synchronization is re¬ established around the point of change or possibly also at a greater distance, if required. The time periods ensure that information about the change will be distributed over a sufficiently large area. On detecting a change/failure, the node forwards informa¬ tion about it and starts its own timer. After the time period has expired, the node reverts to its normal procedures for obtaining timing, and the system starts to synchronize itself within areas which were affected by the change/ failure. The above-mentioned US Patent 2,986,723 discloses a system, in which the standard state is a state of internal timing, in which the node uses its own internal clock as the source of timing. The method disclosed in this patent will be referred to below as Self-Organizing Master-Slave Synchron¬ ization (SOMS) and it will be used as an example in the detailed description of the invention.
As used in this text, the time period refers to a preset period of time intended to prevent the acceptance of faulty/outdated synchronization messages in the system. When the above-mentioned SOMS method is used, the state of internal timing for a preset time period is utilized to eliminate any faulty signatures from the network. When the node reverts to the normal state, the synchronization signature of an incoming signal will not at least contain too positive faulty information about the origin of the synchronization. In other words, the synchronization is not in any case said to originate from a node having a higher level of hierarchy than what the origin actually has. US Patent 2,986,723 suggests that the duration of the time
period of forced internal timing should be equal to a time period required for a substantial number of the nodes of the system to detect the change. The substan¬ tial number is not specified more precisely but it is solely said that the absolute number of nodes consti¬ tuting the substantial number depends on the total number of system nodes. Accordingly, each failure situation causes most of the system portion extracting synchronization through the failed connection or node to enter into the state of internal timing. It is only after this that the reestablishment of synchronization within this system portion is started.
In the different synchronization methods the time periods thus depend on the size and configuration of the system in order to ensure that information about a change/failure will be distributed over an area large enough before the resynchronization is started. For this reason the time periods are dif¬ ficult to set. In large systems the time periods are easily set too long, and so the required timing quality cannot be maintained. This is due to the fact that when the node waits for the expiry of the time period, the frequency of the master clock of the system is not usually available to it. When the system is expanded, the time periods have to be reset, and each node has to be informed separately about the new time periods, which makes the expansion of the system difficult.
The object of the present invention is to provide a method and a system which avoid the above disadvantages. This is achieved by a method according to the invention, which is characterized in that the minimum duration of said time period is equal to a time required for the neighbouring nodes of the node to be informed of the transition of the node into said
standard state and to respond to the change and for the node itself to be informed by the neighbouring nodes about their response. A telecommunications system according to the invention, in turn, is char- acterized in that the system node comprises a timer means for measuring a preset time period equal to a time required for the neighbouring nodes of the node to be informed of the transition of the node into said standard state and to respond to the change and for the node itself to be informed by the neighbouring nodes about their response.
The invention is based on the idea that the minimum time period is selected in a change/failure situation so that it is equal to the time required for the node's (closest) neighbourhood to respond to the situation and for the node itself to be informed of their response. In the preferred embodiment the time period is, of course, equal to the minimum.
The solution according to the invention speeds up the synchronization of the system in a failure situation, and so inferior clock sources need not be used as long as previously. The time period is not either dependent on the system size or configuration so that it can be given a constant value at the system implementation stage. The time period thus need not be changed when the system is expanded, which makes the expansion simpler than previously.
In the following the invention and its preferred embodiments will be described more closely with refer- ence to the examples shown in Figures 3 to 9f of the attached drawings, in which
Figure 1 shows the general configuration of a system employing message-based synchronization when the system is in synchronization with the clock frequency of a master source;
Figure 2 shows the network of Figure 1 when the master node has failed;
Figure 3 shows a network employing self- organizing master-slave synchronization (SOMS) in an initial state;
Figure 4 shows the network of Figure 3 in a stable state;
Figure 5 illustrates the resynchronization of the network of Figure 4 when the master node has failed;
Figure 6 illustrates the resynchronization of the network of Figure 4 when a connection between two nodes has failed;
Figure 7 illustrates the state of a system employing message-based synchronization in a change situation;
Figure 8 illustrates means provided in each individual node for realizing the method according to the invention; and Figures 9a to 9f illustrate the procedural stages of an application of the method according to the invention in a SOMS method.
Figure 3 illustrates a system employing self- organizing master-slave synchronization (SOMS), de- scribed in US Patent 2,986,723 referred to above. In this specific case, the system comprises five nodes (or devices) which are assigned SOMS addresses indicated by the reference numerals 1...5 according to their level of hierarchy. (The master node of the system has the smallest SOMS address. ) The nodes interchange messages containing such SOMS addresses. In this way the nodes are able to identify each other by means of the address numbers and establish a syn¬ chronization hierarchy so that the whole network can synchronize itself with the master node.
As mentioned above, messages transmitted con¬ tinually in the network are dependent on the applied message-based synchronization method. In addition, the messages are specific for each transmitting node. In the SOMS network a synchronization message contains three different parts: a frame structure, signature and check sum. The SOMS signature is the most important part of the SOMS message. It comprises three consecutive numbers Dl to D3: Dl is the origin of the synchronization fre¬ quency of a node transmitting a SOMS message, i.e. the SOMS address of a node appearing as a master node to the transmitting node.
D2 is a distance to a node indicated by Dl. The distance is given as the number of intermediate nodes.
D3 is the SOMS address of a transmitting node.
Each node (or device) compares continuously incoming SOMS signatures with each other and selects the smallest amongst them. In the signature the different parts Dl, D2 and D3 are combined into a single number by placing them in succession (D1D2D3) (for the sake of clarity, a dash will be inserted between the different parts in the text below as follows: D1-D2-D3). Accordingly, a primary criterion for the selection of the smallest address is the SOMS address (Dl) of a node appearing as the master node to the preceding nodes, i.e. the node tends to be syn¬ chronized with a signal having a frequency originally derived from a node with the smallest possible address. In a stable situation, the whole network is thus synchronized with the same master node (as the master node of the whole network has the smallest SOMS address) .
If two or more of the incoming signals are syn- chronized with the same master node, the one arriving
over the shortest path (D2) is selected. The last criterion for selection is the SOMS address (D3) of the node transmitting the SOMS message, which is used for the selection if the incoming signals cannot be distinguished from each other in any other way.
After the node has accepted one of the neigh¬ bouring nodes as its new synchronization source on the basis of an incoming SOMS signature, it has to regenerate its own SOMS signature. The new SOMS signature can be derived from the selected smallest SOMS signature as follows: the first part (Dl) is left intact; the second part (D2) is incremented by one, and the third part (D3) is replaced with the node's own SOMS address. Each node also has its own internal SOMS signature X-O-X, where X is the SOMS address of the node. If none of the incoming SOMS messages contains a signature smaller than the internal signature, the node uses its own internal oscillator or possibly a separate synchronization input as the source of clock frequency. Of course, the outgoing SOMS message there¬ by employs the internal SOMS signature.
The nodes transmit continuously SOMS messages in all directions in order that any changed data in the SOMS signatures "would be distributed as rapidly as possible and that they would know the current operat¬ ing condition of neighbouring nodes. The SOMS signa¬ tures cannot be compared with each other until the incoming SOMS messages have been accepted and the SOMS signatures have been extracted from the messages.
When the first SOMS message is received from a specific transmission line, the SOMS signature con¬ tained therein is accepted immediately for comparison if the message is faultless. When the incoming trans- mission line has an accepted SOMS signature and fault-
less messages containing the same signature are re¬ ceived continuously, the situation remains unchanged. If the SOMS message is found to be faulty, the current SOMS signature is retained until three successive faulty SOMS messages have been received. At this stage the old SOMS signature is no longer accepted for com¬ parison. Waiting for three successive SOMS messages aims at eliminating temporary disturbances.
If no SOMS message is received from the line and there is no line failure, the current SOMS signature is rejected only after a period of time corresponding to three successive SOMS messages. If the line fails totally, the SOMS signature is rejected immediately. If no appropriate SOMS signature is available for comparison due to disturbances in the incoming signal, the SOMS signature of the transmission line is rejected. A constant-value signature where all parts (Dl, D2, D3) have their maximum value (MAX-MAX-MAX) is thereby used in the comparison as the SOMS signature of this incoming transmission line.
When a new changed SOMS signature is detected in an incoming SOMS message, it is accepted immediately for comparison, if the message is faultless. In this way there will be no unnecessary delays in network changes.
Initially each node employs its own internal synchronization source, and transmits its own internal SOMS signature X-O-X to the other nodes. This signa¬ ture is also compared with incoming SOMS signatures. If none of the incoming signatures is smaller than the internal signature, the node continues to use its own internal timing.
In Figure 3, the SOMS network is shown in an initial state when none of the nodes (or devices) has yet processed any one of the incoming SOMS messages.
In all nodes, the highest priority is assigned to the internal SOMS signature of the node as no other signatures have yet been processed. In Figure 3, the SOMS signatures are indicated beside each node to which they are transmitted, and the selected signature is framed (in the initial situation shown in Figure 3 all nodes employ their internal timing source) . Lines used in synchronization are drawn by a continuous line and standby lines are drawn by a broken line (in the initial situation shown in Figure 3, all lines are standby lines) .
When the nodes start to process the incoming SOMS messages, node 1 retains the use of the internal timing, nodes 2 and 4 synchronize themselves with node 1 on the basis of the signature 1-0-1, node 3 is synchronized with node 2 (2-0-2), and node 5 with node 3 (3-0-3). At the same time the nodes generate their own new SOMS signatures as described above and provide their outgoing SOMS message with the new signature. The network in a stable situation is shown in Figure
3. All nodes have synchronized with the master node 1 over the shortest possible path.
If the master node fails in the case of Figure
4, the nodes 2 and 4 are immediately forced to enter into the state of internal timing when they lose the incoming SOMS signature 1-0-1. When the nodes 3 and 5 detect the change that has taken place in the nodes 2 and 4, they are also forced to enter into the state of internal timing. When node 2 reverts to the normal state, it receives the internal SOMS signatures (3-0-3 and 4-0-4) from the nodes 3 and 4 and retains the use of the internal timing as the SOMS signatures received from outside are not smaller than its own internal signature (2-0-2). Node 4 is then synchron- ized with node 2. After having stabilized, the network
is in the state shown in Figure 5, where node 2 is the new master node of the network. If only the connection between the nodes 1 and 2 breaks (Figure 6), only node 2 is forced into the state of internal timing. On reverting to the normal state, it synchronizes itself with node 4 having a connection to the master node of the network. After the stabilization of the entire network, the synchronization still originates from node 1 despite the break. This is illustrated in Figure 6.
When the time period according to the invention is used to prevent the entrance of outdated and faulty synchronization messages, the situation occurring in the system is such as shown in Figure 7. A zone 70 extends around the point of change (the common centre of the circles) . Nodes within this zone have been forced into the standard state for a preset time period (this does not apply to nodes between the point of change and the master clock of the system; they operate normally all the time as the failure/change does not affect their synchronization). At a certain stage the situation is e.g. such as shown in Figure 7: nodes within the innermost zone have already reverted to the normal state, nodes within the next outer circle (70) are "in the forced state for the preset time period, and nodes within the outermost zone still operate on the basis of former information. The synchronization of the system has been reestablished after the zone 70 has reached the edge of the area and disappeared so that all nodes again operate on the basis of valid information.
However, an individual node need not wait for the entire system to detect the change and enter into the defined standard state. It is enough that the neighbourhood of the node knows the changed situation
and has responded to it. The time period to be selected thus has to be sufficiently long for all neighbouring nodes synchronized with a specific node to have time enough to enter into the defined state and to ensure that the node no longer receives faulty synchronization messages when it reverts to the normal state and again starts to select the best possible synchronization signature. The minimum duration of the time period K can be calculated by the following formula:
(1) K = 2 x (S + H + V),
where S is the maximum time required for the gener- ation of a synchronization message and the trans¬ mission of it between two nodes; H is the maximum time required for the acceptance of the synchronization message in the node; and V is the maximum time re¬ quired for the comparison between incoming synchron- ization signatures in the node. The time period according to Formula (1) is independent of the network size; instead, it is a constant depending on the node implementation, the transmission rate used in the system, the synchronization method, the message length and the transmission delays of the system, and can thus be determined at the system implementation stage.
Formula (1) first reckons with the time required for the neighbouring devices of a node forced into the standard state to detect that the node is in the standard state, and then with the time required for the node forced into the standard state to detect that the other nodes have responded to the changed situ¬ ation and to go through the changed incoming synchron¬ ization signatures. Figure 8 shows means provided in each node for
realizing the method according to the invention. The figure shows two connections A and B between a system node and neighbouring nodes. The transmission line of each connection is connected to a signal transmission and a signal reception means 13a and 13b, respective¬ ly, which process the physical signal. The means 13a and 13b forward the synchronization message to an associated synchronization message transmission and reception means 16a and 16b, respectively. The synchronization message transmission and reception means e.g. check whether the message is faultless and forward the message to a centralized synchronization decision means 23 having an input connected to the output of the respective reception means 16a, 16b. The signal transmission and reception means 13a and 13b also supervise the quality of the received signal and store information thereon into interface-specific fault databases 24a and 24b, respectively. The synchronization message transmission and reception means 16a obtains fault data from the database 24a and the transmission and reception means 16b from the fault database 24b, respectively. The signal trans¬ mission and reception means monitor failures/changes in the connection in a manner known per εe . The decision means 23 compares the messages and stores them in a memory 21, e.g. in priority order so that the selected synchronization signature always has the highest status. The decision means also receives the fault data of a specific signal from an interface- specific transmission and reception block 11a or lib in the form of a synchronization message or as separate fault data. When the decision means judges from the supplied data that the node has to enter into the standard state for the preset time period, it selects the source of its timing as defined in the
applied synchronization method for this kind of situation; applies an appropriate synchronization signature to the interface-specific synchronization message transmission and reception means 16a and 16b from a memory 22 (where it generates an outgoing signature used in each particular case) ; and starts a timer means 25. The node informs the neighbouring nodes about the change that has occurred by trans¬ mitting the new signature. When the timer means 25 indicates that the preset time period K has expired, the decision means 23 is again allowed to select the source of timing by a normal procedure.
Figures 9a to 9f illustrate the procedural stages of the solution according to the invention in a SOMS system. Nodes currently in the forced state of internal timing are indicated by underlining the respective numbers. In the initial situation (Figure 9a), the illustrated system portion is connected to the rest of the system and thus also to the master node of the system via a node 17. The node receives from the rest of the system a synchronization signature 1-6-16 originating from the master node of the system (node 1) and transmitted by node 16. On detecting that synchronization has been lost, node 17 is forced to enter into the state of internal timing (Figure 9b), and it starts to transmit its internal synchronization signature 17-0-17. The other nodes have not yet detected the change. At the following stage (Figure 9c), nodes 18 and 19 have detected the change and are also forced into the state of internal timing, starting to transmit their own internal timing signatures 18-0-18 and 19-0-19, respectively. After this (Figure 9d), when the neighbouring nodes of node 17 have responded to the change and node 17 has been informed of their response in the form of the modified
signatures, the time period (K) of node 17 expires, and the node is again allowed to select freely the source of timing. As neither one of the incoming signatures, however, is not superior to the node's own internal signature, node 17 retains the use of internal timing, being, however, free to select a better signature immediately one is received. At this stage, node 20 has also detected the change and entered into the state of internal timing for the above-described time period. At the stage illustrated in Figure 9e, the time period of the nodes 18 and 19 has expired, and both of them select the clock fre¬ quency of node 17 as their new source of timing on the basis of the signature 17-0-17. In the final situation (Figure 9f), the time period of node 20 has also expired, and the system portion apart from the rest of the system is synchronized with the clock frequency of node 17 as no alternative path to the master node of the entire system is available. When the node is in the predetermined standard state, such as the state of internal timing in the SOMS network described above, it is preferable that it receives and processes incoming synchronization signatures continuously. After the expiry of the time period it thereby has a ready synchronization priority list (memory 21, Figure 8), from which it can imme¬ diately select a new source of timing.
In view of system synchronization it is also preferable that all nodes have the same time period. Any unnecessary changes and fluctuations in syn¬ chronization are avoided as the nodes revert to the normal state successively. Accordingly, no isolated areas occur in synchronization as the different system portions respond to changes in synchronization with each other. In this case, the time period is deter-
mined by a node having the longest time period as calculated by Formula 1.
Furthermore, it is also preferable with respect to system synchronization to verify that a connection is bidirectional before it is used for synchroniza¬ tion. If it is not possible to verify the bidirection- ality of the connection, its use for synchronization is prohibited. It this way, it can be ensured that the synchronization will not be lost under any conditions even though the time period is shorter. This might be possible e.g. in a case where the node receives an outdated synchronization signature e.g. over a uni¬ directional connection when it reverts to its normal state after a time period shorter than previously (information about the change has not reached the neighbouring nodes as the connection to them is uni¬ directional) .
In order to be ensure that an internodal con¬ nection is unidirectional, communication is required between the nodes. In practice, such communication may be e.g. transmission of a single bit or handshaking performed by messages. The last-mentioned alternative is to be preferred in that it allows the bidirection- ality of the system to be ascertained reliably without any presumptions "on the system. When a connection is switched on, the communicating parties shake hands to ascertain the bidirectionality of the connection before any actual synchronization messages are trans¬ mitted. The handshaking procedure is repeated after each break, and it is realized in the synchronization message transmission and reception means (cf. Figure 8) . The ascertaining of bidirectionality is described in more detail in the Applicant's parallel FI Patent Application 925072, which is referred to for a more detailed description.
Even though the invention has been described above with reference to the examples shown in the attached drawings, it is obvious that the invention is not limited to them, but it can be modified within the inventive idea disclosed above and in the attached claims. Even though the SOMS system has been used as an example above, the solution according to the invention is applicable in all systems employing message-based synchronization and preventing the selection of faulty/outdated synchronization signat¬ ures by utilizing a standard state of a predetermined duration. Even though the timer means in the above example measure a preset time period K, the invention may also be applied in such a way that the expiry of the time period is bound to the detection of a change in the signatures from the neighbouring nodes.