Method for optimizing time synchronization between network devices connected via a communication network
By optimizing the transmission path of time synchronization messages in a server-based control device, determining a functional unit suitable as the highest-level clock, and minimizing its distance from the external network interface, the problem of inaccurate time synchronization is solved, and higher time synchronization accuracy and lower deviation range are achieved.
Patent Information
- Application Number
- CN202080085510.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-12-12
- Filing Date
- 2020-12-04
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2040-12-04
AI Technical Summary
In server-based control devices, time synchronization messages undergo a long and unpredictable wait time before being transmitted to an external network, resulting in inaccurate time synchronization, affecting the accuracy of collaborative processing and sensor data.
By determining a functional unit suitable as the highest-level clock within a server-based control device and minimizing its distance from a network interface connected to an external network, the transmission path of the time synchronization message is optimized and the number of forwarding operations is reduced.
It achieves higher time synchronization accuracy, reduces the deviation range of time information, and improves the performance of subnetworks that strictly require time synchronization in vehicle networks.
Smart Images

Figure CN114788197B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a communication network comprising network devices synchronized with each other. Background Art
[0002] Ethernet technology is used in many areas for computers to network with each other and is also increasingly used in vehicles, where it is replacing old or proprietary data connections and data buses.
[0003] At the third layer of the OSI layer model, Ethernet connections support a large number of switching protocols for transmitting data packets between a transmitter and a receiver. In higher protocol layers, data streams are segmented into packets, process communication is carried out between communicating systems, data is converted into a system-independent form, and finally functions are provided for applications. Even a relatively small network of network devices close to each other spatially may already have a large number of routers and switches that route data packets from a transmitter to the correct receiver.
[0004] As in other networks, in addition to the nominal speed of network components and interfaces, latency or delay in an Ethernet network can also have a significant impact on the amount of data that can actually be transmitted per unit time and the transmission duration from a transmitter to a receiver.
[0005] Latency or delay can have different sources and causes. The source of data transmission delay in a network is especially the so-called transmission delay, that is, the time required for a transmitter to send a data packet on a communication connection or link. This delay may especially depend on the length of the data packet and the bandwidth or speed of the network.
[0006] The signal propagation time or propagation delay represents the time required for a signal sent by a transmitter through a communication connection to reach a receiver. This delay primarily depends on the distance between the transmitter and the receiver and the propagation speed of the signal. The propagation speed of radio waves in a vacuum or the propagation speed of light waves in an optical fiber corresponds to the speed of light, but in a copper wire, the propagation speed of the signal may drop to two-thirds of the speed of light, depending on the structure of the copper wire.
[0007] Switch latency may also play an important role in the available data rate. This is especially true for networks supporting high-performance and cluster computing applications, where there are advantages in minimizing the overall latency or latency variation in the communication paths between communication endpoint pairs or groups. In many cases, compared with the nominal bandwidth of the connection, switch latency has a much greater impact on application or service performance and the user experience.
[0008] Switch latency represents the time it takes for an Ethernet packet to traverse an Ethernet switch. While this is conceptually simple, in reality there are many factors that can cause the actual latency experienced by a packet to vary significantly, sometimes by several orders of magnitude.
[0009] Switch latency is measured between the input and output ports of an Ethernet switch. This switch latency strongly depends on the switching paradigm used by the switch: cut-through or store-and-forward.
[0010] Store-and-forward requires the switch to receive and buffer the entire packet and then make a forwarding decision and start packet transmission via the output port. For some forwarding operations, such as packet routing performed at Layer 3, the store-and-forward mode may be required when complex options are needed in the packet forwarding operation.
[0011] On the other hand, cut-through forwarding allows the packet to be transmitted immediately via the output port as soon as enough data has been received to make a forwarding decision. For example, in the case of simple Layer 2 forwarding, this can be done once the destination MAC address has been received and looked up to determine the associated output port. Cut-through forwarding is decided on a per-packet basis by the switch.
[0012] Cut-through forwarding can achieve lower latency forwarding in the switch, which is largely independent of the packet length. However, cut-through forwarding is only possible under certain conditions. Cut-through forwarding can, for example, only be performed between interfaces operating at the same speed, such as when connecting a 1Gbps interface to a 1Gbps interface. It cannot be used to connect interfaces of different speeds, such as between a 1Gbps and a 100Mbps interface. Cut-through forwarding may also only be performed when the output port is idle, where idle means not being "stopped" by flow control and having no pending frames queued for transmission.
[0013] It is easy to see that when multiple packet flows in a network with interfaces of different speeds are going to a certain port, even if the total transmission bandwidth required by these flows is less than the nominal link capacity, there may often be contention at that port, and thus, in many cases, less data is forwarded than might be forwarded theoretically using cut-through forwarding.
[0014] The latency of modern layer 2 or layer 3 switches typically ranges from a few hundred nanoseconds to several tens of microseconds. The wide range of latency is mainly caused by the switch architecture and design, but even greater latency differences may occur depending on the application. For example, the number of simultaneously used ports and the type of traffic (e.g., one-to-one traffic without packet flow contention for the output port or fully meshed traffic where all traffic contends for the output port) have a significant impact on latency because in the case of fully meshed traffic, if there is contention for the port, data packets may be buffered in the switch queue for a relatively long time.
[0015] Switch latency is also often associated with the so-called queuing delay, in which the delays of all latencies in the switches located on the communication route are added up.
[0016] In switches, routers, or other network devices that forward data, the so-called processing delay exacerbates the situation. The processing delay refers to the time required to evaluate packet headers or perform error correction measures, etc. In high-speed routers and switches, the order of magnitude of the processing delay is in microseconds or less.
[0017] Therefore, the total time required for a data packet to propagate from the transmitter to the receiver is the sum of the transmission delay, signal propagation time, queuing delay, and processing delay. The higher the frequency at which the signal is received, evaluated, and / or processed by a switch or another network device and only then forwarded, the longer the time it takes to reach the actual receiver.
[0018] In many networks, some delays are relatively short and, in particular, are largely constant, such as the signal propagation time, which only changes when the distance between the transmitter and the receiver changes or when the connected route changes such that the total distance becomes longer or shorter. In a network with sub-routes of known length, even in the case of a route change, the signal propagation time can be determined relatively accurately based on the known distances of the individual sections of the route.
[0019] Other delays are less constant and also unpredictable, such as switch latency, which depends particularly strongly on the amount of data to be transmitted via a certain physical network interface at one time, possibly the priority, and the time.
[0020] In many networks, it is necessary to synchronize the timers present in network devices, especially those included in vehicle networks, where time-synchronized acquisition of sensor data is required for safe operation. To this end, almost all Ethernet communication networks used in vehicles use a time synchronization protocol that provides a global network time base synchronized in all network devices. It is expected that the popularity of time-synchronized network devices in vehicles and other application areas will continue to increase in the future.
[0021] The IEEE 802.1AS standard provides a time synchronization protocol, which is also known as the acronym gPTP of the "generalized Precision Time Protocol". Starting from the so-called "best clock" (also known as the grandmaster timing device or grandmaster clock) in the network, a master-slave clock hierarchy is established. In this case, the grandmaster timing device provides the time base for the network, and all other network devices in the network are synchronized with this time base.
[0022] Figure 1 Shows three basic functions of the generalized Precision Time Protocol: determination of the best clock, exchange of time information, and measurement of the propagation time on the connection line between adjacent nodes.
[0023] The grandmaster timing device is determined and announced within the network through the so-called Best Master Clock Algorithm (BMCA). For this purpose, network devices supporting IEEE 802.1AS periodically transmit announcement messages containing information about their internal clocks to other directly connected network devices. The information about the internal clock provides the following indications: the accuracy of the corresponding clock, its reference or time base, and other attributes that can be used to determine the best clock in the network. Such an announcement message is shown by way of example in Figure 1 a). The receiver of such an announcement message compares the information received with the characteristics of its own internal clock with any messages already received from another port with information about the clocks of other network devices, and if another network device has better clock parameters, accepts the clock in that other network device. After a short time, the best clock in the network has been determined, which then becomes the grandmaster timing device in the network, and a time synchronization spanning tree has been created. In this process, each port of the network device is assigned one of four port states. Ports with a shorter path to the grandmaster timing device than their link partners are assigned the "master port" state. If the other ports at this node do not yet have the "slave" state, the "slave" state is assigned. Ports that do not fully support the PTP protocol select disable. If none of the other three states apply, the "passive" state is selected.
[0024] Based on the grandmaster timing device, time synchronization messages are broadcast through the network. Figure 1The Sync_Follow_Up mechanism schematically shown in b) is used for this purpose. The master port periodically transmits synchronization and Follow_Up messages to the corresponding adjacent link partners. When a synchronization message leaves the master port, a timestamp is generated and immediately transmitted in the subsequent Follow_Up message. This timestamp corresponds to the current clock time of the highest-level timing device at the time when the synchronization message is transmitted.
[0025] Instead of simply forwarding the time synchronization message, the network device that receives the time synchronization message corrects the time information for the propagation time on the previously determined connection (through which the network device receives the time synchronization message from the directly connected network device) and for the internal processing time, and then creates and re-transmits new time synchronization-related messages and the corrected time information. This correction occurs in the so-called "time-aware" system in each network node, that is, also in appropriately configured routers and switches.
[0026] In Figure 1 The so-called "peer delay mechanism" shown by way of example in c) is used to determine the delay between two connected ports. One port (the initiator) starts measuring the line delay by sending a Delay_Request message to the port directly connected to it on the network device (the responder) and generating an initial timestamp with time t1. This initial timestamp represents the hardware timestamp written via the Ethernet transceiver as late as possible before the actual transmission of the time synchronization message. When the time synchronization message arrives, the responder generates timestamp t2. In response, the responder transmits a Delay_Response message. In this message, the responder transmits the received timestamp t2 of the Delay_Request message. When this message leaves the responder, the responder further generates timestamp t3, which is sent in the subsequent Delay_Response_Follow_Up message. When the initiator receives the Delay_Response message, the initiator generates timestamp t4. The initiator can use the four timestamps t1 to t4 to calculate the average propagation time on the communication route.
[0027] Since the propagation time on the connection route may vary depending on the direction, the Delay_Request message is periodically sent independently by the two communication partners.
[0028] In the case of a clock hierarchy according to IEEE 802.1AS and the "Generalized Precision Time Protocol" (gPTP) defined therein, only a single network device always provides the best clock in the network. Therefore, this network device controls and regulates the entire time of the vehicle. All other clocks of the network devices in the network are only controlled by this one clock. Some vehicle manufacturers even synchronize other standard networks, such as CAN, via this Ethernet time master, which means that almost all network devices in the vehicle are informed of the system time by the network device providing the highest-level timing device.
[0029] The highest-level clock periodically transmits time synchronization messages to directly connected network devices, and these directly connected network devices correct the time information for the propagation time and internal processing time on the previously determined transmission route, and then re-transmit the received time synchronization messages to other directly connected network devices in turn. The correction of the time information does not guarantee that each timer of the network device actually runs absolutely synchronously with the highest-level clock, because any correction of the time information inevitably leads to deviations, including deviations due to different time drifts of the timers and other hardware attributes, which may result in inaccuracies in determining the propagation time and delay, etc. With each forwarding operation of the time synchronization message, the possible deviation of the time information from the reference signal of the highest-level clock increases accordingly, that is, the accuracy of the synchronization decreases with each forwarding operation.
[0030] In many application scenarios, especially including vehicles with high driver support provided by an appropriate system or with partially or highly autonomous driving systems, a large amount of sensor data acquired within a narrow time window must be processed together in order to obtain appropriate control signals for the vehicle actuators. For documentation purposes, for example when stored in a log file that can be analyzed to reproduce faults or operational errors, the most accurate possible time registration of the sensor data may also be very important. The latter is very useful for debugging in distributed systems, and especially for insurance companies and law enforcement agencies. Therefore, for so-called "hard" real-time support, it is essential to synchronize the provided time information reliably and, most importantly, as precisely as possible. The more accurate the synchronization of the clock time, the better the results of related functions (such as sensor fusion).
[0031] If the switch in a server-based control device does not support IEEE 802.1AS, this is particularly problematic for precise time synchronization, i.e., the switch cannot correct the time synchronization message for the propagation time of the signal from the transmitter, especially for the switch delay, before retransmission. In cases where the transmitter and receiver are spatially close to each other, the signal propagation time may still be ignored or statistically determined between the transmitter and receiver connected via a switch that does not support IEEE 802.1AS. However, the time delay that occurs due to the buffering of network traffic routed via the switch cannot be determined in a reasonable way or can only be determined in a reasonable way with great effort, which means that the time information in the time synchronization message routed via such a switch exhibits considerable inaccuracies.
[0032] Even in switches that support IEEE 802.1AS, deviations may occur when correcting the time information as needed before forwarding the time synchronization message. Even if these deviations are small in individual cases, they add up to an increasing possible inaccuracy with each forwarding operation.
[0033] Figure 2 a) shows a schematic example of the variation of possible deviations of time information in network devices synchronized according to IEEE 802.1AS. In Figure 2 a), network device 100 provides the highest-level clock and retransmits the time synchronization message to network device 102. Network device 102 corrects the time information before transmitting the corresponding time synchronization message to network device 104. In the correction, network device 102 uses the previously determined propagation time on the connection to network device 100 and information about the internal delay, which depends in particular on the implementation of time synchronization and the hardware properties of the network device. A timing diagram is shown next to the network device, which shows the time sent by network device 100 and the possible deviations after each further transmission. After the first correction, the original single dash representing the time of the time synchronization message transmitted by network device 100 has been supplemented by additional dashes on the left and right. These additional dashes indicate that there may be some deviation in the correction. Network device 102 forwards the time information affected by a certain first possible deviation to network device 104. Network device 104 then corrects the received time information, where a certain deviation in the correction still cannot be excluded, and forwards this time information in the time synchronization message to network device 106. Compared to the timing diagram associated with network device 102, the possible deviation of the time information from the actual time in the highest-level clock (which increases again) is represented by a wider range of possible deviations. The direction of forwarding the time synchronization message is indicated by the arrows between the network devices.
[0034] With each correction and forwarding operation, the possible deviation range thus increases. This does not mean that the deviation is always at the outer edge of the deviation range and that the deviation continues to increase; it is quite possible that there are corrections in the opposite direction (although uncontrollable), which means that the time in the last network device in the chain matches the time of the highest-level clock more accurately than the time in network devices located closer to the highest-level clock. However, since this is unpredictable, the worst-case scenario must be assumed.
[0035] Thus, in some application cases, a smaller number of forwarding operations for time synchronization messages from a clock that is not the best clock in the network according to the BMCA may have an advantage over a clock with (even if only slightly) objectively better properties, but whose time synchronization messages require a large number of forwarding operations to traverse the entire network. This is also because, among other things, the best master clock algorithm does not evaluate or cannot evaluate the entire system.
[0036] In addition, each active component located on the message path from the transmitter to the receiver increases the risk that the path will be interrupted, which is particularly undesirable for security-related communication between network devices.
[0037] The new server-based electrical and electronic architectures introduced in many industrial sectors are concentrating an increasing number of logic and control functions in an ever-decreasing number of control units. These control units (also referred to as servers or central computers) no longer consist of only a single microcontroller or microprocessor as in traditional control computers, but instead have a large number of microcontrollers, microprocessors, system-on-chips (SoCs), etc. arranged in a shared housing to protect against environmental influences and mechanical damage. These control units are hereinafter referred to as server-based control devices. An Ethernet network with a suitable switch can be provided to connect the functional units arranged in the shared housing. In this case, the individual functional units can be directly connected to the ports of the Ethernet switch, that is, there is no need to plug an Ethernet plug into a corresponding socket, and accordingly there is also no need to convert the signal level as required via an Ethernet line and perform other signal processing in the so-called PHY module that forms the connection to the physical layer. Such a connection can be achieved, for example, via a so-called backplane or via a suitable cable set, which establishes an electrical connection between the Ethernet interface of the functional unit and the port of the Ethernet switch. It is also conceivable to arrange a plurality of functional units and the Ethernet switch on the same circuit board and directly connect them to the conductor tracks running on the circuit board. Connecting via a known physical Ethernet connection and the corresponding cables is of course also possible.
[0038] Depending on the number of functional units combined in the housing of the server-based control device, the number of ports of the Ethernet switch can be 20 or even more. At least one port of one or more Ethernet switches leads out of the housing and is connected to the network. The ports leading out of the housing have a physical interface implemented via a PHY module, and these ports are responsible for converting signal levels and other signal processing.
[0039] The PHY module provides mechanical, electrical, and other functional aids for activating and deactivating physical connections, maintaining physical connections, and transmitting bits across physical connections. Therefore, the physical layer is also called the bit transmission layer. Devices and network components assigned to the bit transmission layer are, for example, transceivers, amplifiers, plugs and sockets of network cables. On the bit transmission layer, digital bit transmission takes place over wired or wireless transmission routes. The transmission medium can be shared on this layer by static or dynamic multiplexing. In addition to the specifications of specific transmission media (such as copper cables, fiber optic cables), power grids, and the definition of plug connections, other elements are also required. Additionally, the way individual bits are transmitted must be resolved on this layer: in computer networks, information is transmitted in the form of sequences of bits or symbols. In copper cables and radio transmissions, modulated high-frequency electromagnetic waves are the information carriers; in fiber optic cables, these modulated high-frequency electromagnetic waves are light waves with one or more specific wavelengths. Depending on the modulation method, the information carrier can adopt not only two states of zero and one, but also more states. Therefore, a code must be defined for each type of transmission. Adjusting the signal to be transmitted to the transmission medium may require a long waiting time.
[0040] The functional units arranged in the housing of the control unit (each functional unit can have software or firmware that executes independently of other functional units) are interconnected in the above-described manner via a local area network and can have a common power supply. In this case, there is no information in the individual functional units that can be used to directly determine whether it is connected to the network via a PHY module or whether it is arranged in the same housing as other components.
[0041] It is easy to see that in a server-based control device in which a relatively large number of functional units are accommodated together and interconnected via one or more switches, the time synchronization messages of the highest-level clock, which are inconveniently placed, experience a long and usually unpredictable waiting time before being actually transmitted to the "external" network. This may limit the usefulness of the data obtained at more remote network devices of the network, especially when obtaining time as accurately as possible or obtaining data synchronized with other network devices is important for the results of collaborative processing (also known as sensor fusion).
[0042] Accordingly, an object of the present invention is to specify a method and a device for implementing the method, which provides optimization of time synchronization between network devices connected via a communication network. Summary of the Invention
[0043] Accordingly, an object of the present invention is achieved by the method specified in claim 1 and the server-based control device specified in claim 13. Embodiments and further developments are specified in the respective dependent claims.
[0044] The method according to the present invention for defining a master clock, which is executed in a system of control devices interconnected via a first network or a plurality of first sub-networks, first includes determining the best clock for the entire network. This can be achieved, for example, by performing BMCA according to IEEE 802.1AS.
[0045] At least one of the interconnected control devices is a server-based control device, which combines a plurality of sources suitable as master clocks in one physical unit, and functional units communicatively connected via a switch within the server-based control device by means of a second network. The server-based control device is connected to the first network or the plurality of first sub-networks via one or more network interfaces. The one or more network interfaces can originate from the switch of the server-based control device or from one of the functional units. Accordingly, the first network or the first sub-network is located externally, while the second network is located within the server-based control device.
[0046] If the previously determined best clock for the entire network is located in the server-based control device, the method further includes determining the distance between the selected functional unit of the source suitable as the master clock and the selected active network interface that connects the server-based control device to the first network or the plurality of first sub-networks.
[0047] For example, the basic suitability of the source as the master clock can be determined by analyzing the announcement message of the PTP protocol. Another option is to send PDelay messages to the corresponding adjacent components or start measuring the propagation time delay of the connection. Based on the results of these measurements, the path of the time synchronization message can be determined and it can be identified which functional unit actually supports or is capable of executing the time synchronization protocol.
[0048] The selected functional unit may include any functional unit of the server-based control device that is suitable as a source of the highest-level clock, that is, any functional unit having an internal timer and that can be configured to execute the computer program instructions necessary to provide the highest-level clock. As an alternative, the selected functional unit may include those functional units of the server-based control device whose timers meet a predetermined minimum requirement. For example, only those functional units may be considered whose clock parameters of the timer are equivalent to or only slightly worse than the clock parameters of the highest-level clock determined by the best master clock algorithm. In a further alternative, the selected functional unit may include those functional units of the server-based control device that forward the time synchronization message of the highest-level clock determined by the best master clock algorithm to one of the selected active network interfaces. In the latter case, in order to determine the selected functional unit, for example, path information may be read from the synchronization message, or if the path is supposed to be known, this information may be known from the system configuration.
[0049] The selected active network interface may include any network interface of the server-based control device to a first network or a first sub-network, via which data is at least occasionally transmitted or received between the start and the end of the system operation, that is, via which it is at least possible to temporarily reach at least one other control device. As an alternative, the selected active network interface may include those network interfaces that connect the server-based control device to the first sub-network to which the control device of the time-critical application is connected. The control device of the time-critical application may indicate this, for example, by an appropriate message during network initialization.
[0050] The distance between the selected functional unit and the selected network interface may be characterized, for example, by the number of packet forwarding operations via an intermediate functional unit or a switch, etc., or by the length of the communication line, that is, by the signal propagation time on the communication line. The distance may also have a factor that describes, for example, the delay fluctuations in the transmission and / or reception modules between two functional units, and if there are relatively large fluctuations, this factor effectively increases the distance for the method according to the invention. The network interface that establishes a connection to one of the first network or the first sub-network may be identified, for example, via the propagation time measurement results. This makes use of the fact that the distance between the functional units within the server-based control device is usually significantly shorter than the connection of the network interface to the control device connected to the first network or the first sub-network via a network cable. The signal propagation time on the cable becomes significantly longer. In addition, the components by which the network interface connects to the first network or the first sub-network may add additional delays, such as the so-called PHY latency, which does not occur in the case of connections within the server-based control device.
[0051] If this information does not exist as configuration information or the like in the functional unit of the server-based control device, the control device of the network can also use the measurement result of the propagation time between directly interconnected ports to determine whether it is a functional unit of the server-based control device. Between functional units directly connected to each other "without a physical layer" via a circuit board or a backplane, the latency will be significantly reduced compared to a control device connected via a PHY module and a longer connection medium (such as a network cable).
[0052] The method according to the invention further includes determining, for each of the selected functional units, the average distance to all the selected network interfaces, and defining the selected functional unit with the minimum average distance to all the selected network interfaces as the defined highest-level clock of the entire network. Then, the defined highest-level clock is used as the highest-level clock of the first network or the first sub-network and corresponding time synchronization messages are transmitted into these networks.
[0053] The minimum average distance can be formed, for example, by adding the distances to the selected network interfaces and dividing the sum by the number of the selected network interfaces. It is also conceivable to weight the distances according to the accuracy requirements of the control devices connected via the separately selected network interfaces.
[0054] In an embodiment of the method according to the invention, the defined highest-level clock can synchronize itself within the server-based control device with the highest-level clock determined by the best master clock algorithm. In this case, the highest-level clock determined by the best master clock algorithm can establish a reference time domain, which is applied at least to the functional unit that transmits time synchronization messages into the first network or the first sub-network as the defined highest-level clock. The time synchronization messages of this reference time domain do not have to be forwarded outside the server-based control device. In this case, the defined highest-level clock can use the domain number 0 of the highest-level clock according to the IEEE 802.1AS standard for the first network or the first sub-network and transmit its own identification. Since all functional units of the server-based control device have software that allows or supports this process, the first network or the first sub-network remains compatible with the standardized time synchronization methods and protocols.
[0055] The functional unit of the server-based control device configured to at least execute part of the method described above includes a microprocessor, volatile memory and non-volatile memory, a synchronizable timer, and at least one communication interface communicatively connected to each other via one or more data lines or data buses. The communication interface connects the functional unit to other functional units arranged in the server-based control device. This connection can be made directly or via a router or a switch.
[0056] Accordingly, a server-based control device configured to perform aspects of the methods described above includes a plurality of functional units communicatively interconnected via a second network. The second network may include one or more switches. Network interfaces of the functional units or switches connect the second network to a first network located external to the server-based control device. It is also conceivable that a plurality of network interfaces of the functional units or switches each connect the second network to one of a plurality of first sub-networks located external to the server-based control device. Two or more of the functional units or switches are configured to perform at least parts of the methods described above.
[0057] As proposed in the present method, relocating the highest-level clock closer to the interface of the server-based control device to the network to which it is connected can achieve higher time synchronization accuracy in certain application scenarios, which is particularly advantageous in vehicle networks, for example when some sub-networks have a higher requirement for time synchronization accuracy than others. Compared with the example from Figure 2 a) described above, this can be easily recognized in Figure 2 b): Assume that network device 104 is a network device that provides a network interface to a network located external to the server-based control device, and a control device with a particularly high requirement for the accuracy of time synchronization is connected thereto. Assigning the highest-level clock to network device 104 then results in a smaller number of operations for forwarding time synchronization messages to the external network. Forwarding operations within the server-based control device may also cause delays there, but the maximum possible deviation between the timestamps of data from network devices 106, 108, or 110 from each other is smaller than in the example described with reference to Figure 2 a). It can be clearly seen that the maximum deviation range shown next to the corresponding network device has become smaller. Starting from network device 104, the time information is corrected at most three times, while in the system shown in Figure 2 a), the time information is corrected up to five times.
[0058] Even in a networked system where sub-networks can be dynamically activated or deactivated - with the highest-level clock determined by the BMCA remaining unchanged otherwise - repositioning the highest-level clock closer to the interface of the network to which the server-based control device is connected may offer advantages. For example, if a sub-network that is connected to the first network interface of a first functional unit of a server-based control device and has a high demand for the accuracy of time synchronization is deactivated, repositioning the highest-level clock within the server-based control device closer to a second network interface (via which another still-active sub-network is connected) can provide better time synchronization accuracy for this sub-network. This also applies if an application or function with a high demand for time synchronization accuracy is moved between control devices connected to different sub-networks. In this case, it may be advantageous to reposition the highest-level clock within the server-based control device closer to the network interface to which the control device executing the application or function is connected.
[0059] In this case, the method according to the invention uses a standardized time synchronization method, such that any interaction with other network devices can occur according to the standard. The changes made to time synchronization by the method according to the invention occur only within the control device that is shut down from the network and developed as a unit and whose software components can be appropriately adjusted and tested during development. In this case, there is no need to change the hardware or additional components.
[0060] Repositioning also has the advantage of reducing the likelihood of time synchronization failure by the highest-level clock located within the server-based control device, because the time synchronization message is routed through a smaller number of active components before entering the first network.
[0061] By appropriately prioritizing the control devices connected to a specific sub-network or the functions or applications provided thereby, better time synchronization accuracy can be achieved for them. In particular, the fusion of data from different sensors (such as cameras and radar or lidar) can thus be improved.
[0062] The knowledge obtained when executing this method, such as information about which functional units of the server unit (whose behavior is similar to other control devices in the network) are located within the housing and connected via cable connections, can also be used to efficiently improve system security. By monitoring the signals, cable connections are more vulnerable to eavesdropping than the lines on or within the circuit board, especially in the case of preventing unauthorized opening of the housing or at least identifying the housing through appropriate preventive measures. This information can be used, for example, to preferably implement the corresponding switch to identify unauthorized inserted network devices on those network devices that actually also have freely accessible interfaces or communication connections. Thus, valuable computing resources can be saved.
[0063] The distance between a port of a functional unit of a server-based control device and a network interface that establishes a connection to an external network can be stored as a distance index in the topology map of the network. For example, a port or network interface directly connected to the external network can be assigned a distance of 0, while ports or interfaces located further within the server-based control device are assigned correspondingly increasing larger distances. According to the present invention, if the topology map of the system is available, the distance index can be used to locate the highest-level clock. The distance index can also be used when determining the failure probability and inaccuracy of time synchronization. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The present invention will be explained by way of example with reference to the accompanying drawings hereinafter. In the drawings:
[0065] Figure 1 shows a message flow according to the IEEE 802.1AS standard,
[0066] Figure 2 shows a schematic example of the variation of possible deviations of time information in a network device synchronized according to IEEE 802.1AS,
[0067] Figure 3 shows an exemplary block diagram of a system including a server-based control device and a subnetwork,
[0068] Figure 4 shows the system after BMCA has been executed from Figure 3
[0069] Figure 5 shows the system after the highest-level clock has been creatively relocated within the server-based control device according to the first aspect of the present invention, Figure 3
[0070] Figure 6 shows the system after the highest-level clock has been creatively relocated within the server-based control device according to the second aspect of the present invention, Figure 3
[0071] Figure 7 shows a schematic flowchart of one aspect of the method according to the present invention, and
[0072] Figure 8 shows a schematic block diagram of a functional unit of a server-based control device implementing the method.
[0073] In the drawings, the same or similar elements can be referred to using the same reference numerals. DETAILED DESCRIPTION
[0074] The above has described Figure 1 and Figure 2, and thus will not be discussed further.
[0075] Figure 3 FIG. shows an exemplary block diagram of a system including a server-based control device 200 and sub-networks 240, 242, 244. The server-based control device 200 includes a plurality of functional units 208, 210, 212, 214 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 interconnects the functional units 208, 210, 212, 214 and the network switches 202, 204, and 206. In this case, in addition to one or more network interfaces, the functional units may include a microcontroller or a microprocessor and associated memory, and may perform program-controlled functions.
[0076] A functional unit may be connected to a network switch, such as 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 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 the server-based control device, such as network switches 202 and 206.
[0078] The functional unit itself may also have a network interface that connects to a sub-network located outside the server-based control device, such as functional unit 214 to which sub-network 244 is connected. In this case, functional unit 214 may establish a connection to the internal sub-network of the server-based control device.
[0079] Sub-network 240 includes control device 226, sub-network 242 includes control devices 228 and 230, and sub-network 244 includes control devices 220, 222, 224. The control devices 220, 222, 224, 226, 228, and 230 may be, for example, sensors, actuators, or other server-based control devices.
[0080] Figure 4 FIG. shows after BMCA has been executed from Figure 3The system. Functional unit 208 provides the highest-level clock of the system indicated by the clock symbol. When synchronizing the timers in the corresponding control devices of the system, the time synchronization message is corrected and forwarded up to six times: First, the time synchronization message is transmitted from the highest-level clock in functional unit 208 to switch 202. Switch 202 corrects the time information for the first time before further transmitting the time synchronization message to switch 206. Switch 206 corrects the time information for the second time before transmitting the time synchronization message to functional unit 214. Functional unit 214 corrects the time information for the third time before transmitting the time synchronization message to control device 220. Control device 220 corrects the time information for the fourth time before transmitting the time synchronization message to control device 222. Finally, control device 222 corrects the time information for the fifth time before transmitting the time synchronization message to control device 224. Even if control device 224 does not forward the time synchronization message, the control device itself corrects the time information for the sixth time. The path of the time synchronization message is indicated by the solid arrows.
[0081] It can be easily seen that the possible deviation of the time information is the largest in control device 224; at least the uncertainty about the deviation is the largest for this control device. In the system, it is usually the case that the sensors are exactly arranged at the outermost end of the network and the timestamps assigned to the acquired measurement values may thus have a high possible deviation. To reduce the maximum possible deviation, it is determined according to the present invention whether another functional unit or switch within the server-based control device 200 is suitable as the highest-level clock and whether it is also located closer to the interface of the external sub-network.
[0082] Figure 5 Shows the system from after determining a functional unit within the server-based control device 200 that meets the conditions according to the first embodiment of the present invention and following the relocation of the highest-level clock within the server-based control device 200 Figure 3 of the system. In this example, this is functional unit 214, which on the one hand has its own network interface to the external sub-network and on the other hand requires the smallest possible number of forwarding operations or corrections of the time synchronization message relative to all other switches, functional units, and control devices of the system. In the example shown in the figure, there are at most three.
[0083] Figure 6 Shows the system from after creatively relocating the highest-level clock within the server-based control device 200 according to the second embodiment of the present invention Figure 3The system. In this example, the control devices 228 and 230 have particularly high requirements for time synchronization. The network switch 206 itself is suitable for providing the highest-level clock. Relative to the control devices with high requirements, relocating the highest-level clock to the network switch 206 provides the smallest possible number of forwarding operations, specifically at most two, and still has a relatively small number of forwarding operations for other functional units and control devices.
[0084] In addition, the processing of data from the control devices 228 and 230 can be relocated to the functional unit 214, so that the data can also be forwarded with as few intermediate stations as possible.
[0085] Figure 7 A flowchart of an exemplary method 300 according to the present invention is shown. In step 302, first, for example, the best clock of the network is determined by applying the best master clock algorithm according to IEEE 802.1AS. In step 304, it is checked whether the highest-level clock is located within a server-based control device. If this is not the case, the "No" branch is branched off from step 304 and the method ends. The method can be restarted when the BMCA is executed next time. If the highest-level clock is located within a server-based control device, the "Yes" branch is branched off from step 304. In step 306, a functional unit within the server-based control device that is suitable as the highest-level clock and has the smallest average distance from all selected network interfaces is determined. If the highest-level clock determined in step 302 is provided by the functional unit determined in step 306, the "Yes" branch is branched off from step 308 and the method ends. Otherwise, the "No" branch is branched off from step 308. In step 310, the highest-level clock is moved to the functional unit determined in step 306, and the method ends. The method can be restarted when the BMCA is executed next time.
[0086] Step 306 may include step 306-1 involving selecting candidate functional units that can be moved as the highest-level clock. This may include checking the clock parameters of the functional unit in question and comparing them with the minimum requirements for the clock parameters. The clock parameters are included in, for example, the announcement message of the gPTP protocol.
[0087] Step 306 may further include step 306-2 which involves determining the distance from a selected functional unit to a selected active network interface that connects the server-based control device to an external network or subnetwork. For this purpose, all active network interfaces may be determined. The active network interfaces may be determined, for example, via the propagation time measurement results of messages between two adjacent network nodes in each case; if the measured propagation time between two network nodes is significantly increased compared to other network node pairs, it may be assumed that the connection is not within the server-based control device and is thus a network interface to a subnetwork located outside the server-based control device.
[0088] Step 306 may further include step 306-3 in which the previously determined functional unit with the minimum average distance to all selected network interfaces is defined as the defined highest-level clock.
[0089] Figure 8 An exemplary block diagram of a network device 400 configured to execute the method according to the present invention is shown. In addition to the microprocessor 402, the network device 400 further includes a volatile memory and non-volatile memories 404 and 406, two communication interfaces 408, and a synchronizable timer 410. The elements of the network device are communicatively interconnected via one or more data connections or data buses 412. The communication interface 408 may be a logical interface or port implemented via a physical interface, or a separate physical interface. The non-volatile memory 406 contains program instructions which, when executed by the microprocessor 402, implement at least one embodiment of the method according to the present invention.
[0090] List of reference numerals:
[0091] 100 - 110 Network device
[0092] 200 Server-based control device
[0093] 202 - 206 Switch
[0094] 208 - 214 Functional unit
[0095] 220 - 230 Control device
[0096] 240 - 244 Subnetwork
[0097] 300 Method
[0098] 302 - 310 Method steps
[0099] 400 Functional unit
[0100] 402 Microprocessor
[0101] 404 RAM
[0102] 406 ROM
[0103] 408 Communication Interface
[0104] 410 Timer
[0105] 412 Bus
Claims
1. A method (300) for defining a highest-level clock in a system of control devices (200, 220, 222, 224, 226, 228, 230) interconnected via a first network or a plurality of first sub-networks (240, 242, 244), wherein, At least one of these networked control devices is a server-based control device (200), which combines multiple sources suitable as the highest-level clock in one physical unit, and functional units (208, 210, 212, 214) communicatively connected via a second network within the server-based control device through switches (202, 204, 206). This physical unit is connected to the first network or multiple first sub-networks (240, 242, 244) via one or more network interfaces. The method includes: Determining the best clock for the entire network, wherein when the best clock is located in the server-based control device, the method includes: Determining the distance between the selected functional unit of the source suitable as the highest-level clock and the selected active network interface that connects the server-based control device to the first network or multiple first sub-networks, For each of these selected functional units, determining the average distance from the functional unit to all selected active network interfaces, and Defining the selected functional unit with the minimum average distance to all selected active network interfaces as the defined highest-level clock of the first network or the first sub-network.
2. The method (300) according to claim 1, wherein, The selected functional units are all functional units of the server-based control device that are suitable as sources of the highest-level clock, and the distances to the selected active network interfaces are determined for the clocks of all functional units.
3. The method (300) according to claim 1, wherein The selected functional units are those functional units of the server-based control device that meet a predetermined minimum requirement, where the distances to the selected active network interfaces are determined only for the clocks of these selected functional units.
4. The method (300) according to claim 1, wherein, The selected functional units are those functional units of the server-based control device that forward the time synchronization message of the best clock to the network interface, where the distances to the selected active network interfaces are determined only for the clocks of these selected functional units.
5. The method (300) according to any one of the preceding claims, wherein, The selected active network interfaces are all active network interfaces of the server-based control device.
6. The method (300) according to any one of the preceding claims 1 to 4, wherein, The selected active network interfaces are only the network interfaces of the server-based control device that are connected to the first sub-network connected to the control device that executes the time-critical application.
7. The method (300) according to any one of the preceding claims 1 to 4, wherein, The defined highest-level clock within the server-based control device is synchronized with the best clock determined by applying the best master clock algorithm.
8. The method (300) according to claim 7, wherein, The defined highest-level clock receives a time synchronization message in the reference time domain from the best clock determined by applying the best master clock algorithm within the server-based control device, and replaces the identification of the clock included in these time synchronization messages with its own identification before forwarding the received time synchronization message to the first network or the first sub-network.
9. The method (300) according to any one of the preceding claims 1 to 4, wherein, Determining the best clock includes: Executing the best master clock algorithm according to the IEEE 802.1AS standard.
10. A computer program product including instructions that, when executed by a processor (402) of a functional unit (208, 210, 212, 214) of a server-based control device (200), cause the program to execute the method according to any one of claims 1 to 9.
11. A computer-readable medium having stored thereon the computer program product according to claim 10.
12. A functional unit (208, 210, 212, 214) of a server-based control device (200), the functional unit comprising a microprocessor (402), volatile and non-volatile memories (404, 406), a synchronizable timer (410), and at least one communication interface (408) communicatively interconnected via one or more data lines or data buses (412), wherein, The functional unit is configured to execute the method according to any one of claims 1 to 9.
13. A server-based control device (200) having a plurality of functional units (208, 210, 212, 214) according to claim 12 and at least one switch (202, 204, 206) communicatively connected to each other via a second network, wherein, A network interface of the functional unit or the switch connects a second network to a first network, or a plurality of network interfaces of the functional unit or the switch respectively connect the second network to one of a plurality of first sub-networks, the first network or the plurality of first sub-networks being located outside a server-based control device (200), wherein two or more of these functional units or switches are configured to execute the method according to any one of claims 1 to 9.
14. A vehicle having the server-based control device according to claim 13.
Citation Information
Patent Citations
Path selection method, device, and storage medium
CN109218007A
Decentralised fault-tolerant clock pulse generation in VLSI chips
CN1997969A