Method and apparatus for determining a clock frequency offset
The present disclosure relates to a method ( 400 ) for determining a clock frequency offset between a first device having a first clock and at least one second device having at least one second clock, the method comprising: receiving ( 401 ), by the at least one second device, at least one first message from the first device, wherein information regarding a time of departure of the at least one first message is in the at least one first message; determining ( 402 ), by the at least one second device, a time of arrival of the at least one first message; receiving ( 403 ), by the at least one second device, at least one second message from the first device, wherein information regarding a time of departure of the at least one second message is in the at least one second message; determining ( 404 ), by the at least one second device, a time of arrival of the at least one second message; and determining ( 405 ) a clock frequency offset between the first clock and the at least one second clock based on the time of departure of the at least one first message, the time of arrival of the at least one first message, the time of departure of the at least one second message, and the time of arrival of the at least one second message. The disclosure further relates to a corresponding apparatus, system, computer program product and a computer readable storage medium.
1 . A method for determining a clock frequency offset between a first device having a first clock and at least two second devices, each second device having a respective second clock, the method comprising:
receiving, by the at least two second devices, at least one first message from the first device, wherein information regarding a time of departure of the at least one first message is in the at least one first message;
determining, by the at least two second devices, a time of arrival of the at least one first message;
receiving, by the at least two second devices, at least one second message from the first device, wherein information regarding a time of departure of the at least one second message is in the at least one second message;
determining, by the at least two second devices, a time of arrival of the at least one second message;
determining a clock frequency offset between the first clock and the second clocks based on the time of departure of the at least one first message, the time of arrival of the at least one first message, the time of departure of the at least one second message, and the time of arrival of the at least one second message
sending, by the at least two second devices, third messages to the first device, wherein times of departure of the third messages are determined by the at least two second devices; and
determining a clock phase offset between the first clock and the second clocks based on the time of arrival of the at least one first message, the time of departure of the at least one first message, the time of arrival of the at least one second message, the time of departure of the at least one second message, the time of departures of the third messages, and times of arrival of the third messages,
wherein a subset of the second clocks and/or the first clock is synchronized with respect to a remaining at least one other second clock of the at least two second devices and/or the first clock based on a weighted zero mean error.
2 . The method according to claim 1 , wherein
the time of departure of the at least one first message is a time, related to the first clock, at which the at least one first message is sent by the first device;
the time of arrival of the at least one first message is a time, related to the second clocks, at which the at least one first message is received by the at least two second devices;
the time of departure of the at least one second message is a time, related to the first clock, at which the at least one second message is sent by the first device; and
the time of arrival of the at least one second message is a time, related to the second clocks, at which the at least one second message is received by the second devices.
3 . The method according to claim 1 , wherein
the times of departure of the third messages are times, related to the second clocks, respectively, at which the third messages are sent by the second devices; and
the times of arrival of the third messages are times, related to the first clock, at which the third messages are received by the first device.
4 . The method according to claim 1 , wherein the information regarding the time of departure of the at least one first message and/or of the at least one second message and/or of the third messages is in the at least one first and/or second and/or third messages:
embedded in form of a timestamp in the at least one first and/or second and/or third messages; or
derivable from a predetermined scheduling of the at least one first and/or second and/or third messages.
5 . The method according to claim 1 , wherein the method further comprises:
synchronizing the second clocks to the first clock based on the determined clock frequency offset and/or based on the determined clock phase offset; or
synchronizing the first clock to the second clocks based on the determined clock frequency offset and/or based on the determined clock phase offset.
6 . The method according to claim 5 , wherein the synchronizing of the second clocks or the first clock comprises offsetting timing values of the second clocks or the first clock.
7 . A system comprising a processor, a receiver, a transmitter, and a second clock, wherein:
the receiver is arranged to receive, on a periodic basis, a first message from a first device, wherein information regarding a time of departure of the first message is in the first message, and to receive, on the periodic basis, a second message from the first device, wherein information regarding a time of departure of the second message is in the second message;
the processor is arranged to determine a time of arrival of the first message and a time of arrival of the second message, wherein a clock frequency offset between a first clock of the first device and the second clock is determined based on the time of departure of the first message, the time of arrival of the first message, the time of departure of the second message, and the time of arrival of the second message;
the transmitter is arranged to send a third message to the first device; and
the processor is further arranged to determine a time of departure of the third message, wherein a clock phase offset between the first clock and the second clock is determined based on the time of arrival of the first message, the time of departure of the first message, the time of arrival of the second message, the time of departure of the second message, the time of departure of the third message, and a time of arrival of the third message,
wherein the processor is further arranged to synchronize the second clock to the first clock based on a weighted zero mean error.
8 . The system according to claim 7 , wherein the clock frequency offset and/or the clock phase offset is determined, on the periodic basis, by the processor of the system or by an external device.
9 . The system of claim 7 comprising:
the first device.
10 . One or more tangible, non-transitory, computer-readable media storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
receiving, on a periodic basis by at least one second device having at least one second clock, at least one first message from a first device having a first clock, wherein information regarding a time of departure of the at least one first message is in the at least one first message;
determining, by the at least one second device, a time of arrival of the at least one first message;
receiving, on the periodic basis by the at least one second device, at least one second message from the first device, wherein information regarding a time of departure of the at least one second message is in the at least one second message;
determining, by the at least one second device, a time of arrival of the at least one second message;
determining, on the periodic basis, a clock frequency offset between the first clock and the at least one second clock based on the time of departure of the at least one first message, the time of arrival of the at least one first message, the time of departure of the at least one second message, and the time of arrival of the at least one second message;
sending, by the at least one second device, at least one third message to the first device, wherein times of departure of the at least one third message are determined by the at least one second device; and
determining a clock phase offset between the first clock and the second clocks based on the time of arrival of the at least one first message, the time of departure of the at least one first message, the time of arrival of the at least one second message, the time of departure of the at least one second message, the time of departures of the at least one third message, and times of arrival of the at least one third message,
wherein the at least one second clock and the first clock are synchronized to a weighted zero mean error.