METHOD FOR DETECTING A TRANSMITTER'S LOCATION TIME IN A RECEIVER
Patent Information
- Application Number
- DE502014016973
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2013-05-29
- Filing Date
- 2014-05-27
- Publication Date
- 2026-01-22
- Estimated Expiration
- 2034-05-27
AI Technical Summary
Existing methods for timestamping data in a network require precise synchronization of clocks between transmitters and receivers, which is technically demanding and prone to inaccuracies due to unknown transmission times.
A method where the transmitter sends a relative time duration since a reference time, allowing the receiver to generate timestamps using its own clock, eliminating the need for an exact clock at the transmitter and enabling correction of any inaccuracies.
This approach reduces the technical effort required for clock synchronization and allows accurate timestamping by ensuring all recorded transmitter times are corrected using a uniform reference time.
Description
[0001] The invention relates to a method for detecting the location time of a transmitter in a receiver, a method for generating a timestamp with the location time of the transmitter, as well as a device and a computer program product for carrying out the method.
[0002] From DE 44 38 806 C1, an electronic device configured as a transmitter is known that can send data, for example, to a central computer as a receiver, via a network configured as a fieldbus. It is known to timestamp the data sent by the transmitter in such a system, for example, to verify the validity of the data at the receiver. For the timestamp to be used correctly, the clocks used in the transmitter and receiver should run with the same time values, so that the local time used by the transmitter to generate the timestamp is also correctly interpreted at the receiver at the time the data is sent. This requires synchronizing the clocks in the transmitter and receiver with respect to their absolute time values, which, however, involves considerable technical effort.
[0003] Methods for synchronizing two clocks in devices connected via a network are known, for example, from US 2007 / 0300065 A1 and GB 2 426 164 A. In these methods, timestamps with absolute time values are exchanged between the devices over the network in order to synchronize the clocks, taking into account the propagation delays of the timestamps within the network.
[0004] Documents US 5,027,297 A and US 2011 / 207417 A1 also describe methods for generating a timestamp with an absolute time for data received by a receiver in a network. A key feature is that the transmitter does not have a clock with an absolute time, but rather a clock that indicates a relative time elapsed since an event on the transmitter. The clock on the transmitter can thus be implemented relatively simply, for example, as a counter that increments in equidistant time steps, starting, for example, when the transmitter is switched on. Data from the transmitter is then time-stamped with the counter value. At the receiver, based on the absolute time of receiving the first data record from the receiver, the absolute time corresponding to the start of the counter on the transmitter is determined.Knowing this absolute time, all subsequently received relative timestamps can be converted into absolute timestamps at the receiver.
[0005] When determining the absolute time corresponding to the start of the counter on the transmitter, an unknown transmission time of the first data record, for example, leads to an inaccuracy. The disadvantage is that such an inaccuracy affects all subsequently determined absolute timestamps.
[0006] The object of the invention is to improve the transmission of data from a sender to a receiver with regard to the use of timestamps.
[0007] The problem is solved by the features of the independent claims. Preferred further developments are the subject of the dependent claims.
[0008] According to one aspect of the invention, a method for detecting a transmitter location time of a transmitter in a receiver comprises the following steps: determining a reference time for the transmitter location time, receiving a transmitter time duration from the transmitter that has elapsed on the transmitter since the reference time for the transmitter location time, and determining the transmitter location time in the receiver based on the reference time for the transmitter location time and the received transmitter time duration.
[0009] The reference point for the transmitter's local time is the point in time of an event that occurs simultaneously at both the transmitter and the receiver. This event can be anything, as long as it can be assigned a specific absolute time that is identical on both devices. For example, the initialization or startup of the network could be used as the event. Another or additional possibility, in the case of a sensor, would be to use specific measurement situations as events and determine the reference point for the transmitter's local time based on these.
[0010] In the method according to the invention, the sender does not transmit a timestamp with an absolute time value to the receiver, but only a relative time duration that has elapsed since a reference time. If the receiver knows the reference time to which the relative reference time duration received from the sender relates, then it can construct the required timestamp itself on site. In this way, the sender does not need to maintain its own clock with an exact absolute time. It is sufficient to use any timer with which time intervals to previously defined reference times can be measured and transmitted to the receiver.
[0011] This means that the effort required to maintain an exact time value is borne solely by the receiver, not the transmitter. This can offer significant advantages, especially if the aforementioned electronic device is, for example, a sensor that only transmits measurement data to a control loop, but does not receive it and therefore does not need to perform any data validity checks itself. Furthermore, should the exact time value be incorrectly maintained at the receiver, all recorded transmitter location times can be subsequently corrected using the described procedure, as a uniform reference time is used for all recorded transmitter location times.
[0012] In a further development of the specified method, the received transmitter duration includes a value from a counter running on the transmitter, since counters as timers are particularly cost-effective and technically easy to implement.
[0013] In another further development of the specified procedure, the reference time for the transmitter location time is recalculated at regular intervals in order to correct, for example, drift or jitter in the transmitter time duration output by the transmitter.
[0014] In a preferred embodiment of the described method, the reference time for the sender's local time is determined by recording the receiver time elapsed since the event and subtracting it from the receiver's local time. In this way, the reference time for the sender's local time can be determined at any given time in the receiver without the need to store the reference time itself in memory.
[0015] In a particularly preferred further development of the specified procedure, the reference time for the transmitter location time is added to the received transmitter time duration to determine the transmitter location time.
[0016] According to a further aspect of the invention, a method for generating a timestamp with a sender location time for a data unit generated by a sender comprises the following steps: sending the data unit together with a sender time duration that has elapsed since a reference time for the sender location time, from the sender to a receiver and generating the timestamp based on the sender location time at the time of sending the generated data unit, which is captured by one of the methods specified above.
[0017] According to another aspect of the invention, a device, which is in particular designed as a computing unit, is configured to carry out one of the specified methods.
[0018] In a further development of the invention, the specified device comprises a memory and a processor. One of the specified methods is stored in the memory in the form of a computer program, and the processor is provided for executing the method when the computer program is loaded from the memory into the processor.
[0019] The invention also relates to a computer program with program code means to perform all steps of one of the specified methods when the computer program is executed on a computer or one of the specified devices.
[0020] The invention also relates to a computer program product that contains program code which, when executed on a data processing device, performs one of the specified methods.
[0021] The invention is explained in more detail below with reference to exemplary embodiments and the accompanying figures. The figures show: Fig. 1 a schematic representation of a network with electronic devices, and Fig. 2 a schematic representation for determining a transmitter location time at the time of transmission of data in a transmitter.
[0022] In the figures, identical technical elements are labelled with the same reference symbols and described only once.
[0023] It will be on Fig. 1 Reference is made to the diagram showing a schematic representation of a network 2 with a fieldbus connection module 4 and electronic devices 6.
[0024] In the present implementation, network 2 can, for example, be a fieldbus known per se, which, in an industrial plant below a control level, connects sensors and actuators to control loops for specifying control variables. Such fieldbuses, such as CANopen (controller area network), PROFIBUS, PROFINET, and EtherCAT, are known and will not be described further here.
[0025] The individual electronic devices 6 can be structured according to the type of a modular control system, as known, for example, from DE 44 38 806 C1. Within this structure, the individual electronic devices can comprise the respective connection module 4. Connection blocks 8 can be connected to the network 2 via the individual fieldbus connection modules 4. The individual connection blocks 8 are constructed from signal conductor disks 10 and supply disks (not shown) via which sensors 12, actuators 14, and other field devices 16 can be controlled.
[0026] Furthermore, a central computer 18 can be connected to the network 2, which is superior to the electronic devices 6 in order to control the electronic devices 6, for example in the context of automated manufacturing, and to specify the aforementioned control parameters.
[0027] During network operation, the fieldbus connection modules 4 of the electronic devices 6 send data 19, such as error logs or other messages, to the central computer 18. The central computer 18 receives the transmitted data 19 and evaluates the received data 19. In this context, it may be necessary for the central computer 18 to determine the validity of the received data 19.
[0028] One way to provide the central computer 18 with a measure for the validity of the data 19 is to provide the data 19 with timestamps 20, from which, for example, the time of creation or generation of the data 19 can be clearly determined. Such timestamps 20 could, for example, be generated directly in the fieldbus connection modules 4 of the electronic devices 6 before the data 19 is transmitted, based on a real-time clock. However, it must be ensured that the central computer 18, as the receiver, also has a corresponding real-time clock that is synchronized with the real-time clock of the corresponding electronic device 6 from which the central computer 18 receives the data. Only then can all participants 6, 18 in the network 2 use the same time base to assess the validity of the data 19.
[0029] However, the provision of a real-time clock in all network participants will be omitted below, without having to forgo evaluating the validity of the data 19. An example of this would be if one of the electronic devices 6 had to transmit only data 19. The host computer 18 could generate the timestamp 20 itself, while the electronic device 6 itself does not require a timestamp. The generation of a timestamp 20 for the data 19 transmitted by the electronic device 6 on the host computer 18 will be described in detail below.
[0030] To generate the timestamp 19 itself, the central computer 18 requires the local time 21 of the fieldbus connection module 4 of the electronic device 6 transmitting the data 19, which is hereinafter referred to as the transmitter local time 21. For this purpose, in the present embodiment, a relative transmitter timer 22, such as a counter, is used in the fieldbus connection module 4 of the electronic device 6 transmitting the data 19. Starting from a time reference base to be described later, this outputs an elapsed time duration 23, hereinafter referred to as the transmitter time duration 23, which is transmitted to the central computer 18.
[0031] When the fieldbus connection module 4 of the electronic device 6 transmitting the data 19 transmits data 19 to the host computer 18, it also transmits the current transmission duration 23 of the transmitter timer 22 along with this data 19. The host computer 18 adds the received transmission duration 23 and a reference time 24, which is yet to be defined, in an adder 25, thus obtaining the aforementioned transmitter location time 21. From the transmitter location time 21, the host computer 18 can then generate the timestamp 20 in a timestamp generation device 26 and, for example, generate corresponding time-stamped data 28 in a mixer 27 based on the data 19 and the timestamp 20.
[0032] To carry out the procedure described above, the reference time 24 mentioned above should be a time base to which both the fieldbus connection module 4 of the electronic device 6 transmitting the data 19 and the host computer 18 refer. In this case, the reference time 24 can be formed by subtracting a real-time value 30 and a receiver duration 32 in a subtraction element 34. In the present embodiment, the real-time value 30 is read from a real-time clock 36 running on the host computer 18. The receiver duration 32 is a duration value analogous to the transmitter duration 23. It is therefore read from a relative receiver timer 38 running on the host computer 18, which, as in the fieldbus connection module 4 of the electronic device 6 transmitting the data 19, can be configured as a counter.Using the receiver duration 32, the above-mentioned common time base and thus the reference time 24 can be found, to which the fieldbus connection module 4 of the electronic device 6 sending the data 19 as well as the control computer 18 refer when generating their respective durations 23, 32.
[0033] To establish such a common time base and thus a common reference point 24, the two relative timers 22, 38 are synchronized with each other by an event 40. A suitable event of this kind could be, for example, the activation of one of the two network participants 6, 18. Upon receiving the event-synchronizing event 40, all relative timers 22, 38 can then be started.
[0034] The background of the event synchronization of the two timers 22, 38 and the associated possibility of determining the transmitter location time 21 for generating a timestamp 20 in the master computer 18 will be explained below using the following examples: Fig. 2 This will be explained in more detail.
[0035] The transmitter location time 21 also represents a time duration, but this is to be considered from a purely illustrative absolute reference time 42, which is comparable to a coordinate origin in a coordinate system. From this purely illustrative, absolute reference time 42, the absolute transmitter location time 21 represents a time duration at any first time point 44 in time, and the absolute receiver location time 30 represents a time duration at any second time point 46 in time. The absolute transmitter location time 21 is in Fig. 2 For clarity, it is shown with dotted lines.
[0036] In contrast, there is the common reference time 24, at which the event-synchronizing event 40 occurred and at which both timers 22 and 38 were started. If the absolute receiver local time 30 is measured in the master computer 18 upon receiving the data 19, the common reference time 24 at the time of event 40 can be calculated from this absolute receiver local time 30 using the receiver duration 32, which is also available in the master computer 18. From this common reference time 24, the master computer 18 can then uniquely determine the transmitter local time 21 in the manner described above, taking into account the received transmitter duration 23. Reference symbol list
[0037] 2 Network 4 Fieldbus connection module 6 Electronic devices 8 Connection blocks 10 Signal conductor discs 12 Sensor 14 Actuator 16 Field devices 18 Wire controller 19 Data 20 Timestamp 21 Transmitter location time 22 Transmitter timer 23 Transmitter duration 24 Reference time 26 Timestamp generation device 27 Mixer 28 Time-stamped data 30 Real time 32 Receiver duration 34 Subtraction element 36 Real-time clock 38 Receiver timer 40 Result 42 Reference time 44 First time point 46 Second time point
Claims
1. A method for detecting a transmitter local time (21) of a transmitter (4) in a receiver (18), comprising - Determining a reference time (24) for the transmitter local time (21), wherein the reference time (24) for the transmitter local time (21) is the time of an event (40) that takes place in the same manner on the transmitter (4) and the receiver (18), - Receiving a transmitter time duration (23) from the transmitter (4) that elapsed on the transmitter (4) since the reference time (24) for the transmitter local time (21), and - Determining the transmitter local time (21) in the receiver (18) based on the reference time (24) for the transmitter local time (21) and on the received transmitter time duration (23).
2. The method according to one of the previous claims, wherein the received transmitter time duration (23) has a value of a counter (22) running on the transmitter (4).
3. The method according to Claim 1 or 2, comprising an updating of the reference time (24) based on another event.
4. The method according to one of Claims 1 to 3, wherein in order to determine the reference time (24) for the transmitter local time (21) a receiver time duration (32) that elapsed on the receiver (18) since the event (40) is detected and subtracted from a current receiver local time (30).
5. The method according to one of the previous claims, wherein in order to determine the transmitter local time (21) the reference time (24) for the transmitter local time (21) is added to the received transmitter time duration (23).
6. A method for generating a time stamp (20) with a transmitter local time (21) to a data unit (19) generated by a transmitter (4), comprising: - Transmitting the data unit (19) together with a transmitter time duration (23) that elapsed since a reference time (24) for the transmitter local time (21) from the transmitter (4) to a receiver (18); - Determining the transmitter local time (23) according to a method according to one of the previous claims; and - Generating (26) the time stamp (20) based on the transmitter local time (21) at the time of the transmitting of the generated data unit (19).
7. A device (18), optionally a system, in particular a calculating unit, comprising a receiver and optionally a transmitter, which are designed to carry out a method according to one of the previous claims.
8. A computer program product comprising a program code which, when it is executed on a data processing device of a receiver, carries out a method according to one of the previous claims.