METHOD FOR OPTIMISING THE TIME SYNCHRONISATION BETWEEN NETWORK DEVICES CONNECTED VIA A COMMUNICATIONS NETWORK

20230103012 · 2023-03-30

    Inventors

    Cpc classification

    International classification

    Abstract

    In a system of control devices networked with one another via a first network or multiple first sub-networks, and of which at least one is a server-based control device that combines multiple functional units, a grandmaster clock is defined by ascertaining the best clock of the entire network. If the best clock is located in a server-based control device, the distances are ascertained between selected functional units that are suitable as a source of the grandmaster clock and selected active network interfaces that connect the server-based control device to the first network or multiple first sub-networks, and the average distance to all selected network interfaces for each of the selected functional units is determined. That selected functional unit that has the smallest average distance to all selected network interfaces is defined as grandmaster clock for the first network or the first sub-networks.

    Claims

    1. A method for defining a grandmaster clock in a system of control devices networked with one another via a first network or multiple first sub-networks, wherein at least one of the networked control devices is a server-based control device that combines multiple functional units that are suitable as a source of the grandmaster clock and are connected in terms of communication within the server-based control device by way of a second net work via switches in one physical unit, which is connected to the first network or multiple first sub-networks via one or more network interfaces, comprising: ascertaining the best clock of the entire network, wherein the method comprises, when the best clock is located in a server-based control device: ascertaining the distances between selected functional units, which are suitable as a source of the grandmaster clock, and selected active network interfaces that connect the server-based control device to the first network or multiple first sub-networks, determining the average distance to all selected network interfaces for each of the selected functional units, and defining the selected functional unit that has the smallest average distance to all selected network interfaces as defined grandmaster clock for the first network or the first sub-networks.

    2. The method as claimed in claim 1, wherein selected functional units are all functional units of the server-based control device that are suitable as a source of the grandmaster clock, and the distances to the selected active network interfaces are ascertained for the clocks of all functional units.

    3. The method as claimed in claim 1, wherein selected functional units are those functional units of the server-based control device that meet predetermined minimum demands, and wherein the distances to the selected active network interfaces are ascertained only for the clocks of these selected functional units.

    4. The method as claimed in claim 1, wherein selected functional units are those functional units of the server-based control device that forward the time synchronization messages of the best clock to a network interface, and wherein the distances to the selected active network interfaces are ascertained only for the clocks of these selected functional units.

    5. The method as claimed in claim 1, wherein selected active network interfaces are all active network interfaces of the server-based control device.

    6. The method as claimed in claim 1, wherein selected active network interfaces are only network interfaces of the server-based control device that connect first sub-networks to which control devices that execute a time-critical application are connected.

    7. The method as claimed in claim 1, wherein the defined grandmaster clock within the server-based control device is synchronized with the best clock ascertained by applying the Best Master Clock algorithm.

    8. The method as claimed in claim 7, wherein the defined grandmaster clock receives time synchronization messages in a base time domain from a best clock ascertained within the server-based control device by applying the Best Master Clock algorithm and exchanges an identification of the clock contained in the received time synchronization messages for its own identification before it retransmits the time synchronization messages into the first network or the first sub-networks.

    9. The method as claimed in claim 1, wherein ascertaining the best clock comprises: executing the BMCA in accordance with IEEE 802.1AS.

    10. A non transitory computer-readable medium having stored thereon computer executable instructions that, when executed by a processor of a functional unit of a server-based control device, define a grandmaster clock in a system of control devices networked with one another via a first network or multiple first sub-networks, wherein at least one of the networked control devices is the server-based control device, wherein the server-based control device combines multiple functional units that are sui table as a source of the grandmaster clock and are connected in terms of communication within the server based control device by way of a second network via switches in one physical unit, which is connected to the first network or multiple first sub-networks via one or more network interfaces by performing operations comprising: ascertaining the best clock of the entire network, wherein, when the best clock is located in a server-based control device: ascertaining the distances between selected functional units, which are suitable as a source of the grandmaster clock, and selected active network interfaces that connect the server based control device to the first network or multiple first sub-networks. determining the average distance to all selected network interfaces for each of the selected functional units, and defining the selected functional unit that has the smallest average distance to all selected network interfaces as defined grandmaster close for the first network or the first sub-networks.

    11. (canceled)

    12. (canceled)

    13. (canceled)

    14. A vehicle having a server-based control device, the server based control device having multiple functional units connected to one another in terms of communication via a second network and at least one switch, wherein a network interface of a functional unit or of a switch connects the second, network to a first network, or multiple network interfaces of functional units or switches connect t he second network to in each case one of multiple first sub-networks that is or are located outside of the server-based control device, wherein two or more of the functional units or switches are configured to define a grandmaster clock, wherein the server-based control device combines multiple functional units that are suitable as a source of the grandmaster clock, by performing operations comprising: ascertaining the best clock of the entire network, wherein, when the best clock is located In a server-based control device: ascertaining the distances between selected functional units, which are suit able as a source of the grandmaster dock, and selected active network interfaces that connect the server-based control device to the first network or multiple first sub-networks. determining the average distance to all selected network interfaces for each of the selected functional units, and defining the selected functional unit that has the smallest average distance to all selected network interfaces as defined grandmaster clock for the first network or the first sub-networks.

    15. The non-transitory computer-readable medium as claimed in claim 10, wherein selected functional units are all functional units of the server-based control device that are suitable as a source of the grandmaster clock, and the distances to the selected active network interfaces are ascertained for the clocks of all functional units.

    16. The non-transitory computer-readable medium as claimed in claim 10, wherein selected functional units are those functional units of the server-based control device that meet predetermined minimum demands, and wherein the distances to the selected active network interfaces are ascertained only for the clocks of these selected functional units.

    17. The non-transitory computer-readable medium as claimed in claim 10, wherein selected functional units are those functional units of the server-based control device that forward the time synchronization messages of the best clock to a network interface, and wherein the distances to the selected active network interfaces are ascertained only for the clocks of these selected functional units.

    18. The non-transitory computer-readable medium as claimed in claim 10, wherein selected active network interfaces are all active network interfaces of the server-based control device.

    19. The non-transitory computer-readable medium as claimed in claim 10, wherein selected active network interfaces are only network interfaces of the server-based control device that connect first sub-networks to which control devices that execute a time-critical application are connected.

    20. The non-transitory computer-readable medium as claimed in claim 10, wherein the defined grandmaster clock within the server-based control device is synchronized with the best clock ascertained by applying the Best Master Clock algorithm.

    21. The non-transitory computer-readable medium as claimed in claim 20, wherein the defined grandmaster clock receives time synchronization messages in a base time domain from a best clock ascertained within the server-based control device by applying the Best Master Clock algorithm and exchanges an identification of the clock contained in the received time synchronization messages for its own identification before it retransmits the time synchronization messages into the first network or the first sub-networks.

    22. The vehicle as claimed in claim 14, wherein selected functional units are all functional units of the server-based control device that are suitable as a source of the grandmaster clock, and the distances to the selected active network interfaces are ascertained for the clocks of all functional units.

    23. The vehicle as claimed in claim 14, wherein selected functional units are those functional units of the server-based control device that meet predetermined minimum demands, and wherein the distances to the selected active network interfaces are ascertained only for the clocks of these selected functional units.

    24. The vehicle medium as claimed in claim 14, wherein selected functional units are those functional units of the server-based control device that forward the time synchronization messages of the best clock to a network interface, and wherein the distances to the selected active network interfaces are ascertained only for the clocks of these selected functional units.

    25. The vehicle as claimed in claim 14, wherein selected active network interfaces are all active network interfaces of the server-based control device.

    26. The vehicle as claimed in claim 14, wherein selected active network interfaces are only network interfaces of the server-based control device that connect first sub-networks to which control devices that execute a time-critical application are connected.

    27. The vehicle as claimed in claim 14, wherein the defined grandmaster clock within the server-based control device is synchronized with the best clock ascertained by applying the Best Master Clock algorithm.

    28. The vehicle as claimed in claim 27, wherein the defined grandmaster clock receives time synchronization messages in a base time domain from a best clock ascertained within the server-based control device by applying the Best Master Clock algorithm and exchanges an identification of the clock contained in the received time synchronization messages for its own identification before it retransmits the time synchronization messages into the first network or the first sub-networks.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0064] The invention will be explained below by way of example with reference to the drawings.

    [0065] FIG. 1 shows message flows in accordance with the IEEE 802.1AS standard.

    [0066] FIG. 2 shows schematic examples of the change in the possible deviation of time information in network devices that are synchronized in accordance with IEEE 802.1AS.

    [0067] FIG. 3 shows an exemplary block diagram of a system containing a server-based control device and sub-networks.

    [0068] FIG. 4 shows the system from FIG. 3 after the BMCA has been executed.

    [0069] FIG. 5 shows the system from FIG. 3 after the inventive relocation of the grandmaster clock within the server-based control device according to a first aspect of the invention.

    [0070] FIG. 6 shows the system from FIG. 3 after the inventive relocation of the grandmaster clock within the server-based control device according to a second aspect of the invention.

    [0071] FIG. 7 shows a schematic flowchart of one aspect of the method according to the invention.

    [0072] FIG. 8 shows a schematic block diagram of a functional unit of a server-based control device implementing the method.

    [0073] Identical or similar elements may be referenced using the same reference signs in the figures.

    DETAILED DESCRIPTION

    [0074] FIGS. 1 and 2 have already been described above and will therefore not be discussed again.

    [0075] FIG. 3 shows an exemplary block diagram of a system containing a server-based control device 200 and sub-networks 240, 242, 244. The server-based control device 200 comprises multiple functional units 208, 210, 212, 214 that are connected to network switches 202, 204 and 206. The network switches 202, 204 and 206 are interconnected, such that there is an internal sub-network within the server-based control device that connects the functional units 208, 210, 212, 214 and the network switches 202, 204 and 206 to one another. In addition to one or more network interfaces, a functional unit may in this case comprise a microcontroller or microprocessor and associated memory and may execute a program-controlled function.

    [0076] A functional unit may be connected to a network switch, such as for example functional unit 208 and network switch 202, or functional unit 212 and network switch 204, but a functional unit may also be connected to two network switches, such as for example functional unit 214 and network switch 206.

    [0077] One or more network switches may have network interfaces that connect the internal sub-network to sub-networks located outside of the server-based control device, for example the network switches 202 and 206.

    [0078] A functional unit may itself also have a network interface that connects a sub-network located outside of the server-based control device, such as for example functional unit 214, to which the sub-network 244 is connected. Functional unit 214 may in this case establish the connection to the internal sub-network of the server-based control device.

    [0079] Sub-network 240 comprises a control device 226, sub-network 242 comprises the control devices 228 and 230, and sub-network 244 comprises the control devices 220, 222, 224. Control devices 220, 222, 224, 226, 228 and 230 may be for example sensors, actuators or other server-based control devices.

    [0080] FIG. 4 shows the system from FIG. 3 after the BMCA has been executed. Functional unit 208 provides the grandmaster clock of the system, indicated by the clock symbol. When synchronizing the timers in the respective control devices of the system, the time synchronization messages are corrected and forwarded up to six times: First, a time synchronization message is transmitted from the grandmaster clock in functional unit 208 to switch 202. Switch 202 corrects the time information a first time before it in turn transmits a time synchronization message to switch 206. Switch 206 corrects the time information a second time before it transmits a time synchronization message to functional unit 214. Functional unit 214 corrects the time information a third time before it transmits a time synchronization message to control device 220. Control device 220 corrects the time information a fourth time before it transmits a time synchronization message to control device 222. Finally, control device 222 corrects the time information a fifth time before it transmits a time synchronization message to control device 224. Control device 224 will itself make a sixth correction to the time information even if it does not forward the time synchronization message. The path of the time synchronization message is illustrated by the solid arrows.

    [0081] It is easy to see that the possible deviation of the time information is greatest in control device 224; at least the uncertainty about the deviation is greatest for this control device. In systems, it is often the case that sensors are arranged right at the outermost ends of a network and the timestamps assigned to the acquired measured values may accordingly have a high possible deviation. In order to reduce the greatest possible deviation, it is ascertained according to the invention whether another functional unit or a switch within the server-based control device 200 is suitable as a grandmaster clock and is also located even closer to an interface to external sub-networks.

    [0082] FIG. 5 shows the system from FIG. 3 after ascertaining a functional unit within the server-based control device 200 that satisfies the conditions and following the relocation of the grandmaster clock within the server-based control device 200, according to a first embodiment of the invention. In this example, this is functional unit 214, which on the one hand has its own network interface to an external sub-network, and on the other hand requires the smallest possible number of forwarding operations or corrections of the time synchronization message in relation to all other switches, functional units and control devices of the system. In the example shown in the figure, there are three of these at most.

    [0083] FIG. 6 shows the system from FIG. 3 after the inventive relocation of the grandmaster clock within the server-based control device 200 according to a second embodiment of the invention. In this example, the control devices 228 and 230 have particularly high time synchronization demands. Network switch 206 is itself suitable for providing the grandmaster clock. Relocating the grandmaster clock to network switch 206 offers the smallest possible number of forwarding operations in relation to the control devices that make the high demands, specifically two at most, and still has a comparatively small number of forwarding operations for the other functional units and control devices.

    [0084] In addition, processing of the data coming from the control devices 228 and 230 may be relocated to the functional unit 214, such that the data may also be forwarded with as few intermediate stations as possible.

    [0085] FIG. 7 shows a flowchart of an exemplary method 300 according to the invention. In step 302, the best clock of the network is first determined, for example by applying the Best Master Clock algorithm in accordance with IEEE 802.1AS. In step 304, it is checked whether the grandmaster clock is located within the server-based control device. If this is not the case, “n” branch from step 304, the method is ended. The method may be restarted at the next execution of the BMCA. If the grandmaster clock is located within the server-based control device, “y” branch from step 304, in step 306, the functional unit within the server-based control device that is suitable as a grandmaster clock and that has the smallest average distance from all selected network interfaces is ascertained. If the grandmaster clock determined in step 302 is provided by the functional unit ascertained in step 306, “y” branch from step 308, the method is ended. Otherwise, “n” branch from step 308, in step 310, the grandmaster clock is moved to the functional unit ascertained in step 306, and the method is ended. The method may be restarted at the next execution of the BMCA.

    [0086] Step 306 may comprise a step 306-1 involving selecting functional units that could be candidates for a move of the grandmaster clock. This may comprise a check of the clock parameters of the functional units in question and a comparison with minimum demands of the clock parameters. The clock parameters are contained for example in Announce messages of the gPTP protocol.

    [0087] Step 306 may furthermore comprise a step 306-2 involving ascertaining the distances from selected functional units to selected active network interfaces that connect the server-based control device to an external network or sub-network. All active network interfaces may be determined for this purpose. Active network interfaces may be ascertained for example via propagation time measurements of messages between in each case two neighboring network nodes; if a significantly increased propagation time is measured between two network nodes compared to other pairs of network nodes, it may be assumed that the connection is not located within a server-based control device and is therefore a network interface to a sub-network located outside of the server-based control device.

    [0088] Step 306 may furthermore comprise a step 306-3 in which the previously ascertained functional unit with the smallest average distance to all selected network interfaces is defined as the defined grandmaster clock.

    [0089] FIG. 8 shows an exemplary block diagram of a network device 400 configured so as to carry out the method according to the invention. In addition to a microprocessor 402, the network device 400 comprises volatile and non-volatile memory 404, 406, two communication interfaces 408 and a synchronizable timer 410. The elements of the network device are connected to one another in terms of communication via one or more data connections or data buses 412. The communication interfaces 408 may be logical interfaces or ports implemented via a physical interface, or separate physical interfaces. The non-volatile memory 406 contains program instructions that, when they are executed by the microprocessor 402, implement at least one embodiment of the method according to the invention.

    LIST OF REFERENCE SIGNS

    [0090] 100 network devices

    [0091] 200 server-based control device

    [0092] 202 switches

    [0093] 206

    [0094] 208 functional units

    [0095] 214

    [0096] 220 control devices

    [0097] 230

    [0098] 240 sub-networks

    [0099] 244

    [0100] 300 method

    [0101] 302 method steps

    [0102] 310

    [0103] 400 functional unit

    [0104] 402 microprocessor

    [0105] 404 RAM

    [0106] 406 ROM

    [0107] 408 communication interface

    [0108] 410 timer

    [0109] 412 bus