KR101176798B1 - Method for clock synchronization between slave and master - Google Patents

Method for clock synchronization between slave and master Download PDF

Info

Publication number
KR101176798B1
KR101176798B1 KR1020110035240A KR20110035240A KR101176798B1 KR 101176798 B1 KR101176798 B1 KR 101176798B1 KR 1020110035240 A KR1020110035240 A KR 1020110035240A KR 20110035240 A KR20110035240 A KR 20110035240A KR 101176798 B1 KR101176798 B1 KR 101176798B1
Authority
KR
South Korea
Prior art keywords
slave device
value
master device
offset
time
Prior art date
Application number
KR1020110035240A
Other languages
Korean (ko)
Inventor
송민현
Original Assignee
주식회사 다산네트웍스
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 다산네트웍스 filed Critical 주식회사 다산네트웍스
Priority to KR1020110035240A priority Critical patent/KR101176798B1/en
Application granted granted Critical
Publication of KR101176798B1 publication Critical patent/KR101176798B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03LAUTOMATIC CONTROL, STARTING, SYNCHRONISATION OR STABILISATION OF GENERATORS OF ELECTRONIC OSCILLATIONS OR PULSES
    • H03L7/00Automatic control of frequency or phase; Synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

PURPOSE: A clock synchronization method between a master device and a master device is provided to generate clocks synchronized with a master device by quickly estimating a time offset and a frequency drift between the master device and a slave unit. CONSTITUTION: A slave device transmits and receives a necessary message for synchronization to/from a master device(S310). The slave device samples offset values and TOD(Time of Day) values(S320). The slave device samples calculated offset values and the TOD values which are transmitted from the master device over the predetermined number of times(S330). The slave device determines a drift initial value according to the relationship of the TOD values and the offset values(S340). The slave device estimates the frequency drift value of the slave device in an error feedback mechanism(S350). The slave device synchronizes the frequency of the slave device with the master device by using the estimated drift value(S360).

Description

슬레이브 장치와 마스터 장치 간의 클락 동기화 방법{METHOD FOR CLOCK SYNCHRONIZATION BETWEEN SLAVE AND MASTER}How to synchronize clock between slave device and master device {METHOD FOR CLOCK SYNCHRONIZATION BETWEEN SLAVE AND MASTER}

개시된 기술은 슬레이브 장치와 마스터 장치 간의 클락 동기화 방법에 관한 것으로, 보다 상세하지만 제한됨 없이는, 슬레이브 장치가 동기화에 필요한 주파수 드리프트 값을 추정하는 시간을 단축하는 방법에 관한 것이다. The disclosed technique relates to a clock synchronization method between a slave device and a master device, and more particularly, but without limitation, relates to a method for reducing the time for the slave device to estimate the frequency drift value required for synchronization.

이더넷 등의 네트워크를 통하여 연결된 마스터 장치와 슬레이브 장치들 간의 클럭 동기화를 위한 방안들이 제안되고 있다. 다수의 클럭을 포함하는 분산 제어 시스템에서, 타임 동기화(time synchronization)는 발신지 오실레이터의 고유의 불안정성 및 사용 환경 상태에 따른 타임 표류(drift)의 영향을 줄이기 위해 채용될 필요가 있다. IEEE 1588은 네트워크 상에서 정밀하고 정확하게 동기화된 클럭을 활용할 수 있도록 제안된 프로토콜이다. Methods for clock synchronization between a master device and slave devices connected through a network such as Ethernet have been proposed. In a distributed control system that includes multiple clocks, time synchronization needs to be employed to reduce the effects of time drift on the source oscillator's inherent instability and usage environment conditions. IEEE 1588 is a proposed protocol that can take advantage of precisely and accurately synchronized clocks on a network.

개시된 기술이 이루고자 하는 기술적 과제는 슬레이브 장치가 네트워크로 연결된 마스터 장치와 클락을 동기화하는 방법을 제공하는 데 있다.An object of the present invention is to provide a method for a slave device to synchronize a clock with a master device connected via a network.

상기의 기술적 과제를 이루기 위하여 개시된 기술의 제1 측면은 슬레이브 장치가 네트워크로 연결된 마스터 장치와 클락(clock)을 동기화하는 방법에 있어서, 상기 마스터 장치와 동기화에 필요한 메시지를 송수신하여 오프셋(offset) 값들 및 TOD(Time of Day) 값들을 샘플링 하는 단계; 상기 샘플링 된 오프셋 값들과 상기 샘플링 된 TOD 값들의 관계에 따라, 드리프트(drift) 초기값을 결정하는 단계; 및 상기 결정된 드리프트 초기값을 사용하여, 에러 피드백 방식(error feedback mechanism)으로, 상기 슬레이브 장치의 주파수 드리프트 값을 추정하는 단계를 포함하는 클락 동기화 방법을 제공한다.In order to achieve the above technical problem, a first aspect of the disclosed technology is a method of synchronizing a clock with a master device connected to a network by a slave device, and transmitting and receiving offset values by transmitting and receiving a message required for synchronization with the master device. And sampling time of day values; Determining an initial drift value according to the relationship between the sampled offset values and the sampled TOD values; And estimating a frequency drift value of the slave device by an error feedback mechanism using the determined drift initial value.

개시된 기술의 실시 예들은 다음의 장점들을 포함하는 효과를 가질 수 있다. 다만, 개시된 기술의 실시 예들이 이를 전부 포함하여야 한다는 의미는 아니므로, 개시된 기술의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다. Embodiments of the disclosed technique may have effects that include the following advantages. It should be understood, however, that the scope of the disclosed technology is not to be construed as limited thereby, since the embodiments of the disclosed technology are not meant to include all such embodiments.

개시된 기술의 일 실시예에 따르면, 이더넷으로 연결된 마스터 장치와 슬레이브 장치 간의 클락 동기화에 소요되는 시간을 단축시킬 수 있다는 장점이 있다. 개시된 기술에서는 마스터 장치와 슬레이브 장치 간의 시간 오프셋 및 주파수 드리프트를 보다 빠르게 추정할 수 있으므로, 슬레이브 장치가 보다 빠르게 마스터 장치와 동기화된 클락을 생성할 수 있다. According to one embodiment of the disclosed technology, the time required for clock synchronization between an Ethernet-connected master device and a slave device can be shortened. In the disclosed technique, the time offset and frequency drift between the master device and the slave device can be estimated more quickly, so that the slave device can generate the clock synchronized with the master device more quickly.

도 1은 IEEE 1588 프로토콜에 따라 클락을 동기화 하는 일반적인 방법을 설명하기 위한 흐름도이다.
도 2는 개시된 기술의 일 실시예에 따른 IEEE 1588 동기화 시스템을 설명하기 위한 블록도이다.
도 3은 개시된 기술의 일 실시예에 따른 동기화 방법을 설명하기 위한 순서도이다.
도 4는 TOD 값과 오프셋 값의 관계를 나타내는 그래프이다.
1 is a flowchart illustrating a general method of synchronizing clocks according to the IEEE 1588 protocol.
2 is a block diagram illustrating an IEEE 1588 synchronization system according to an embodiment of the disclosed technology.
3 is a flowchart illustrating a synchronization method according to an embodiment of the disclosed technology.
4 is a graph illustrating a relationship between a TOD value and an offset value.

개시된 기술에 관한 설명은 구조적 내지 기능적 설명을 위한 실시예에 불과하므로, 개시된 기술의 권리범위는 본문에 설명된 실시예에 의하여 제한되는 것으로 해석되어서는 아니 된다. 즉, 실시예는 다양한 변경이 가능하고 여러 가지 형태를 가질 수 있으므로 개시된 기술의 권리범위는 기술적 사상을 실현할 수 있는 균등물들을 포함하는 것으로 이해되어야 한다.The description of the disclosed technique is merely an example for structural or functional explanation and the scope of the disclosed technology should not be construed as being limited by the embodiments described in the text. That is, the embodiments may be variously modified and may have various forms, and thus the scope of the disclosed technology should be understood to include equivalents capable of realizing the technical idea.

한편, 본 출원에서 서술되는 용어의 의미는 다음과 같이 이해되어야 할 것이다.Meanwhile, the meaning of the terms described in the present application should be understood as follows.

“제1”, “제2” 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하기 위한 것으로 이들 용어들에 의해 권리범위가 한정되어서는 아니 된다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.The terms " first ", " second ", and the like are used to distinguish one element from another and should not be limited by these terms. For example, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결될 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 한편, 구성요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.It is to be understood that when an element is referred to as being "connected" to another element, it may be directly connected to the other element, but there may be other elements in between. On the other hand, when an element is referred to as being "directly connected" to another element, it should be understood that there are no other elements in between. On the other hand, other expressions describing the relationship between the components, such as "between" and "immediately between" or "neighboring to" and "directly neighboring to", should be interpreted as well.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한 복수의 표현을 포함하는 것으로 이해되어야 하고, "포함하다" 또는 "가지다" 등의 용어는 설시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Singular expressions should be understood to include plural expressions unless the context clearly indicates otherwise, and terms such as "include" or "have" refer to features, numbers, steps, operations, components, parts, or parts thereof described. It is to be understood that the combination is intended to be present, but not to exclude in advance the possibility of the presence or addition of one or more other features or numbers, steps, operations, components, parts or combinations thereof.

각 단계들은 문맥상 명백하게 특정 순서를 기재하지 않은 이상 명기된 순서와 다르게 일어날 수 있다. 즉, 각 단계들은 명기된 순서와 동일하게 일어날 수도 있고 실질적으로 동시에 수행될 수도 있으며 반대의 순서대로 수행될 수도 있다.Each step may occur differently from the stated order unless the context clearly dictates the specific order. That is, each step may occur in the same order as described, may be performed substantially concurrently, or may be performed in reverse order.

여기서 사용되는 모든 용어들은 다르게 정의되지 않는 한, 개시된 기술이 속하는 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한 이상적이거나 과도하게 형식적인 의미를 지니는 것으로 해석될 수 없다.
All terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the disclosed technology belongs, unless otherwise defined. Terms such as those defined in the commonly used dictionaries should be construed as consistent with the meanings in the context of the related art, and should not be construed as having ideal or overly formal meanings unless expressly defined in this application. .

도 1은 IEEE 1588 프로토콜에 따라 클락을 동기화 하는 일반적인 방법을 설명하기 위한 흐름도이다. 도 1을 참조하여, IEEE 1588 프로토콜이 동작하는 일반적인 방법은 다음과 같다.1 is a flowchart illustrating a general method of synchronizing clocks according to the IEEE 1588 protocol. Referring to FIG. 1, a general method of operating the IEEE 1588 protocol is as follows.

마스터 장치가 슬레이브 장치에 동기화 메시지(Sync)를 송신하고, 내부 전송 타임 스탬프(T1)를 생성한다. 슬레이브 장치는 동기화 메시지를 수신하고 도착 타임 스탬프(T2)를 생성한다. 마스터 장치는 생성된 전송 타임 스탬프 데이터를 포함한 후속 메시지(Follow up)를 뒤따라 전송한다. 슬레이브 장치는 전송 타임 스탬프 데이터를 기초로 마스터 장치가 동기화 메시지를 보낸 때를 알게 되며, 도착 타임 스탬프 데이터와 비교하여 동기화 메시지를 보낸 때와 도착한 때를 알게 된다. 타임 스탬프의 차이에는 네트워크의 전파 지연이 포함되므로, 마스터 장치와 슬레이브 장치의 오프셋 값은 동기화 메시지를 보낸 때와 도착한 때의 시간 차이에서 전파 지연을 뺀 값이 된다. 네트워크의 전파 지연 값을 결정하기 위해 슬레이브 장치는 지연 요청 메시지(Delay Request)를 마스터 장치에 전송하고 전송 타임 스탬프(T3)를 생성한다. 마스터 장치는 지연 요청 메시지를 수신하면 그 도착 시간(T4)을 지연 응답 메시지(Delay Response)를 통해 슬레이브 장치로 전송한다. 이후, 네트워크의 전파 지연(Tmean _ propagation _ delay)은 T2와 T1 간의 차이와 T4와 T3 간의 차이의 평균으로 결정될 수 있다. 이와 같은 네트워크의 전파 지연을 고려한 오프셋(Toffset)은 수학식 1과 같이 산출될 수 있다. The master device sends a synchronization message (Sync) to the slave device and generates an internal transmission time stamp (T 1 ). The slave device receives the synchronization message and generates an arrival time stamp T 2 . The master device transmits following a follow up message including the generated transmission time stamp data. The slave device knows when the master device sent a synchronization message based on the transmission time stamp data, and compares the arrival time stamp data with the arrival time stamp data. Since the time stamp difference includes the propagation delay of the network, the offset value of the master device and the slave device is obtained by subtracting the propagation delay from the time difference between when the synchronization message is sent and when it arrives. To determine the propagation delay value of the network, the slave device sends a delay request message (Delay Request) to the master device and generates a transmission time stamp T 3 . When the master device receives the delay request message, the master device transmits the arrival time T 4 to the slave device through a delay response message. Then, the propagation delay (T mean _ propagation _ delay ) of the network may be determined as an average of the difference between T 2 and T 1 and the difference between T 4 and T 3 . The offset T offset considering the propagation delay of the network may be calculated as shown in Equation 1.

Figure 112011028016621-pat00001
Figure 112011028016621-pat00001

Figure 112011028016621-pat00002
Figure 112011028016621-pat00002

Figure 112011028016621-pat00003
Figure 112011028016621-pat00003

슬레이브 장치는 산출된 오프셋 값을 고려한 내부 클럭을 미세 조정한다. 일정한 시간 간격을 두고 마스터 장치는 클럭 동기화를 유지하기 위한 후속 메시지와 동기화 메시지를 전송하며, 마스터와 슬레이브는 송수신되는 메시지들을 참조하여 클럭을 동기화한다.The slave device fine tunes the internal clock in consideration of the calculated offset value. At regular time intervals, the master device transmits subsequent messages and synchronization messages to maintain clock synchronization, and the master and slave synchronize clocks with reference to messages sent and received.

슬레이브 장치에서 발생하는 주파수 드리프트는 마스터 장치와 주파수 위상의 차이를 발생시키므로, 마스터 장치와 슬레이브 장치의 클락을 정밀하게 동기화하기 위해서는 오프셋을 이용하여 시간을 동기화하는 것 뿐 아니라, 주파수를 동기화하는 과정이 추가적으로 필요하다. 주파수는 슬레이브 장치의 주파수 드리프트 값을 이용하여 보정할 수 있으며, 드리프트 값은 오프셋 값과 드리프트 초기값을 이용하여 에러 피드백 방식(error feedback mechanism)에 따라 반복적으로 추정할 수 있다. 에러 피드백 방식으로는 PI(Proportional Integral: 비례 적분)/PD(Proportional Derivative: 비례 미분)/PID(Proportional Integral Derivative: 비례 적분 미분) 컨트롤 방식 등이 있다. 이하, 설명의 편의를 위하여, 에러 피드백 방식 중 PI 컨트롤 방식을 예를 들어 설명하나, 이에 제한되는 것은 아니며 다양한 방법의 에러 피드백 방식이 적용될 수 있다. PI 컨트롤 방식은 비례제어 방식과 적분제어 방식을 함께 사용하는 방식이다. 비례제어 방식은 기준 신호와 되먹임 신호 사이의 차인 오차 신호에 적당한 비례상수 이득을 곱해서 제어 신호를 생성한다. 비례제어 방식에 따라, 제어량이 목표값에 가까워지면 비례제어 방식 만으로는 그 이상의 미세한 제어가 어려워지는데, 적분제어를 사용하여 제어량과 목표값의 미소한 차이인 잔류 편차를 줄일 수 있다. 적분제어는 미소한 잔류편차를 누적하여 소정의 크기로 된 곳에서 조작량을 증가하여 편차를 없애는 방식으로 동작한다. Since the frequency drift in the slave device causes a difference in frequency phase with the master device, in order to precisely synchronize the clocks of the master device and the slave device, not only the time synchronization using the offset but also the frequency synchronization process is required. Additionally needed. The frequency may be corrected using the frequency drift value of the slave device, and the drift value may be repeatedly estimated according to an error feedback mechanism using an offset value and an initial drift value. Error feedback methods include PI (Proportional Integral), PD (Proportional Derivative), and PID (Proportional Integral Derivative). Hereinafter, for convenience of description, a PI control method among the error feedback methods will be described as an example, but is not limited thereto. Error feedback methods of various methods may be applied. The PI control method uses a proportional control method and an integral control method together. The proportional control method generates a control signal by multiplying an appropriate proportional constant gain by an error signal that is a difference between the reference signal and the feedback signal. According to the proportional control method, when the control amount approaches the target value, further fine control becomes difficult with the proportional control method alone. Integral control can be used to reduce the residual deviation, which is a slight difference between the control amount and the target value. Integral control works by accumulating a small residual deviation and increasing the manipulated value at a predetermined size to eliminate the deviation.

그러나 종래의 방식들은 에러 피드백 방식을 적용하는데 필요한 변수들(예를 들어, 드리프트 초기값)의 샘플링 시간이 오래 걸려 클럭 동기화 시간의 지연을 초래한다는 단점이 있다.
However, the conventional methods have a drawback in that the sampling time of the variables (eg, the drift initial value) required for applying the error feedback method is long, resulting in a delay in clock synchronization time.

도 2는 개시된 기술의 일 실시예에 따른 IEEE 1588 동기화 시스템을 설명하기 위한 블록도이다. 도 2의 IEEE 1588 동기화 시스템(200)은 1588 시간 정보를 제공하는 1588 마스터 장치(210)와 제공받은 1588 시간 정보를 이용하여 동기화된 클럭을 생성하는 적어도 하나의 1588 슬레이브 장치(220)를 포함한다. 슬레이브 장치(220)는 마스터 장치(210)와 유무선 네트워크를 통하여 연결되며, 1588 프로토콜로 동기화에 필요한 정보를 주고 받는다. 개시된 기술의 일 실시예에 따른 IEEE 1588 동기화 시스템(200)은 드리프트 값을 추정하기 위하여 기존의 에러 피드백 방식을 이용하되, 드리프트 초기값을 예측하는 전처리 단계를 추가하여 드리프트 값의 추정 시간을 단축한다. 드리프트 초기값은 TOD(Time of Day) 값과 오프셋 값 간의 관계에 따라 예측될 수 있으며 일 실시예에 따라 최소 자승법의 원리가 사용될 수 있다. 이하, 도 2 및 도 3을 참조하여 일 실시예에 따른 클럭 동기화 방법을 구체적으로 설명한다.2 is a block diagram illustrating an IEEE 1588 synchronization system according to an embodiment of the disclosed technology. The IEEE 1588 synchronization system 200 of FIG. 2 includes a 1588 master device 210 providing 1588 time information and at least one 1588 slave device 220 generating a synchronized clock using the provided 1588 time information. . The slave device 220 is connected to the master device 210 through a wired or wireless network, and transmits and receives information necessary for synchronization using a 1588 protocol. The IEEE 1588 synchronization system 200 according to an embodiment of the disclosed technology uses an existing error feedback scheme to estimate the drift value, and adds a preprocessing step of predicting the drift initial value to shorten the estimation time of the drift value. . The initial drift value may be predicted according to a relationship between a time of day (TOD) value and an offset value, and according to an embodiment, the principle of least square method may be used. Hereinafter, a clock synchronization method according to an embodiment will be described in detail with reference to FIGS. 2 and 3.

마스터 장치(210)는 동기화에 필요한 메시지 및 TOD(Time of Day) 정보를 슬레이브 장치(220)에 전송한다. 일 실시예에 따라, 동기화에 필요한 메시지는 동기화 메시지(Sync), 후속 메시지(Follow up) 및 지연 응답 메시지(Delay Response)를 포함한다. TOD 정보는 마스터 장치(210)와 직간접적으로 연결된 GPS(Global Positioning System) 수신기를 통하여 마스터 장치(210)에게 제공될 수 있다. TOD 정보는 PTP(Precision Time Protocol) 방식으로 캡슐화되어 슬레이브 장치(220)에 전송될 수 있으며, 동기화에 필요한 메시지 또한 1588 프로토콜에 따라 슬레이브 장치(220)에 전송될 수 있다. The master device 210 transmits a message and time of day (TOD) information necessary for synchronization to the slave device 220. According to an embodiment, the message required for synchronization includes a synchronization message (Sync), a follow-up message (Follow up), and a delay response message (Delay Response). The TOD information may be provided to the master device 210 through a global positioning system (GPS) receiver directly or indirectly connected to the master device 210. The TOD information may be encapsulated in a Precision Time Protocol (PTP) scheme and transmitted to the slave device 220, and a message required for synchronization may also be transmitted to the slave device 220 according to the 1588 protocol.

슬레이브 장치(220)는 마스터 장치(220)로부터 제공되는 동기화에 필요한 메시지 및 TOD 정보를 이용하여 마스터 장치(220)와 동기화된 클럭을 생성한다. 일 실시예에 따른 슬레이브 장치(220)는 NIU(Network Interface Unit, 222), CPU(Central Processing Unit, 224) 및 전역 시간 모듈(Global Time Module, 226)을 포함한다. 도 2에서는 슬레이브 장치(220)의 기본적인 동작을 위한 일반적인 모듈 및 본 실시예에 따른 동기화 방식과 직접적이 관련이 없는 슬레이브 장치(220)의 구성은 생략한다. The slave device 220 generates a clock synchronized with the master device 220 using the TOD information and the message required for synchronization provided from the master device 220. The slave device 220 according to an embodiment includes a network interface unit (NIU) 222, a central processing unit (CPU) 224, and a global time module 226. In FIG. 2, the general module for the basic operation of the slave device 220 and the configuration of the slave device 220 which are not directly related to the synchronization method according to the present embodiment are omitted.

NIU(222)는 마스터 장치(210)와 1588 프로토콜로 통신한다. NIU(222)는 마스터 장치(210)로부터 수신하는 동기화 메시지(Sync), 후속 메시지(Follow up), 지연 응답 메시지(Delay Response) 및 TOD 정보 등의 1588 패킷을 CPU(224)에 전달한다. CPU(224)는 수신된 메시지에 포함된 정보를 기초로 오프셋 값을 산출하고, 오프셋 값들과 TOD 값들을 소정 횟수만큼 샘플링 한다. CPU(224)는 샘플링된 오프셋 값들과 TOD 값들을 기초로 드리프트 초기 값을 결정한다. 드리프트 초기값이 결정되면, CPU(224)는 에러 피드백 방식에 따라 슬레이브 장치의 주파수 드리프트 값을 추정한다. CPU(224)는 추정된 드리프트 값과 오프셋 값을 전역 시간 모듈(226)에 제공한다. 드리프트 값과 오프셋 값을 결정하는 방법은 도 3을 참조하여 후술한다. 전역 시간 모듈(226)은 제공받은 드리프트 값과 오프셋 값을 이용하여 마스터 장치(210)와 동기화된 클럭을 생성한다. 전역 시간 모듈(226)은 카운터를 포함하여, 자체적인 클락 신호를 생성하고, 생성된 신호의 시간 오프셋과 주파수 드리프트를 조정하여 마스터 장치(210)와 동기화된 클락을 생성한다. 전역 시간 모듈(226)은 동기화된 클락 및 TOD를 출력하여 슬레이브 장치(220) 내부의 타 모듈에 전달하거나 타 슬레이브 장치에 전달할 수 있다.
The NIU 222 communicates with the master device 210 in a 1588 protocol. The NIU 222 transmits a 1588 packet, such as a synchronization message (Sync), a follow-up message (Follow up), a delay response message (Delay Response), and TOD information, received from the master device 210 to the CPU 224. The CPU 224 calculates an offset value based on the information included in the received message, and samples the offset values and the TOD values by a predetermined number of times. The CPU 224 determines the drift initial value based on the sampled offset values and the TOD values. When the drift initial value is determined, the CPU 224 estimates the frequency drift value of the slave device according to the error feedback scheme. CPU 224 provides the estimated drift and offset values to global time module 226. A method of determining the drift value and the offset value will be described later with reference to FIG. 3. The global time module 226 generates a clock synchronized with the master device 210 using the provided drift and offset values. The global time module 226 includes a counter to generate its own clock signal and adjust the time offset and frequency drift of the generated signal to generate a clock synchronized with the master device 210. The global time module 226 may output the synchronized clock and the TOD and transmit the synchronized clock and the TOD to another module in the slave device 220 or to another slave device.

도 3은 개시된 기술의 일 실시예에 따른 동기화 방법을 설명하기 위한 순서도이다. 도 2의 IEEE 1588 동기화 시스템(200)을 시계열적으로 구현한 방법도 본 실시예에 포함되므로 도 2에 대하여 설명된 부분은 본 실시예에도 적용된다. 도 3은 슬레이브 장치(220)가 네트워크로 연결된 마스터 장치(210)와 동기화된 클럭을 생성하기 위해 주파수 드리프트 값을 추정하는 방법을 설명한다. 본 실시예에 따르면, 종래의 드리프트 값 추정 방법과 비교하여 추정 시간이 단축될 수 있다는 장점이 있다. 3 is a flowchart illustrating a synchronization method according to an embodiment of the disclosed technology. Since the method of implementing the IEEE 1588 synchronization system 200 of FIG. 2 in a time series is also included in the present embodiment, the part described with respect to FIG. 2 also applies to the present embodiment. 3 illustrates a method in which the slave device 220 estimates a frequency drift value to generate a clock synchronized with a networked master device 210. According to the present embodiment, there is an advantage that the estimation time can be shortened compared to the conventional drift value estimation method.

S310 단계에서 슬레이브 장치(220)는 마스터 장치(210)와 동기화에 필요한 메시지를 송수신한다. 일 실시예에 따라, 도 1에서 설명한 바와 같이, 먼저 마스터 장치(210)가 슬레이브 장치(220)에게 동기화 메시지(Sync)를 송신하고, 뒤이어, 동기화 메시지(Sync)가 송신된 시점(T1)에 대한 정보를 포함하는 후속 메시지(Follow up)를 슬레이브 장치(220)에게 송신한다. 슬레이브 장치(220)는 네트워크 전송 지연 시간을 산출하기 위한 지연 요청 메시지를 송신하며, 이를 수신한 마스터 장치(210)는 지연 요청 메시지를 수신한 시점(T4) 정보를 포함한 지연 응답 메시지(Delay Response)를 슬레이브 장치(220)에게 전송한다. 마스터 장치(210)는 GPS 수신기 등으로부터 제공받는 TOD 정보를 슬레이브 장치(220)에게 전송한다.In operation S310, the slave device 220 transmits and receives a message necessary for synchronization with the master device 210. According to one embodiment, as described with reference to FIG. 1, the master device 210 first transmits a synchronization message Sync to the slave device 220, followed by a time point T 1 at which the synchronization message Sync is transmitted. A follow up message including information on the S2 is transmitted to the slave device 220. The slave device 220 transmits a delay request message for calculating a network transmission delay time, and the master device 210 receiving the delay request message includes a delay response message including information on a time point T 4 when the delay request message is received. ) Is transmitted to the slave device 220. The master device 210 transmits the TOD information provided from the GPS receiver to the slave device 220.

S320 단계에서 슬레이브 장치(220)는 오프셋(offset) 값들 및 TOD(Time of Day) 값들을 샘플링 한다. 슬레이브 장치(220)는 S310 단계에서 송수신한 메시지들의 정보를 기초로 오프셋 값을 산출할 수 있다. 일 실시예에 따라, 슬레이브 장치(220)는 동기화 메시지(Sync)가 마스터 장치(210)에서 송신된 시점(T1)과 슬레이브 장치(220)에서 수신된 시점(T2) 정보, 및 지연 요청 메시지(Delay Response)가 슬레이브 장치(220)에서 송신된 시점(T3)과 마스터 장치(210)에서 수신된 시점(T4)정보를 기초로 수학식 1과 같이 오프셋을 산출한다.In operation S320, the slave device 220 samples the offset values and the time of day (TOD) values. The slave device 220 may calculate an offset value based on the information of the messages transmitted and received in operation S310. According to an embodiment, the slave device 220 receives a time point T 1 when a synchronization message Sync is transmitted from the master device 210, a time point T 2 received from the slave device 220, and a delay request. An offset is calculated as shown in Equation 1 based on the time T 3 transmitted from the slave device 220 and the time T 4 received from the master device 210.

슬레이브 장치(220)는 전술한 바와 같이 산출되는 오프셋 값 및 마스터 장치(210)로부터 전송되는 TOD 값을 소정 횟수(N회) 이상 샘플링한다(S330). 시간에 따라 샘플링 되는 오프셋 값은 1차 함수와 유사하게 증가하는 특징이 있으며, 본 실시예에서는 이러한 오프셋 값과 TOD 값의 관계에 따라 드리프트 초기값을 결정한다. 샘플링 횟수는 사용자에 의하여 결정되는 임의의 값(예컨대, 5 내지 10회)일 수 있으며, 오차 값 또는 오차율이 소정 값보다 작아질 때까지 샘플링이 수행되도록 할 수도 있다. The slave device 220 samples the offset value calculated as described above and the TOD value transmitted from the master device 210 more than a predetermined number (N times) (S330). The offset value sampled over time is characterized by an increase similar to the linear function. In this embodiment, the initial drift value is determined according to the relationship between the offset value and the TOD value. The sampling frequency may be any value determined by the user (eg, 5 to 10 times), and the sampling may be performed until the error value or the error rate is smaller than the predetermined value.

S340 단계에서 슬레이브 장치(220)는 S320 내지 S330 단계에서 샘플링 된 오프셋 값들과 TOD 값들의 관계에 따라, 드리프트(drift) 초기값을 결정한다. 도 4는 TOD 값과 오프셋 값의 관계를 나타내는 그래프이다. 도 4의 그래프에 각각의 점들은 S330 단계에서 시간(TOD, xi)에 따라 샘플링된 오프셋 값(yi)들을 나타내는 것으로 1차 함수와 유사한 관계에 있음을 알 수 있다. 따라서, TOD와 오프셋은 수학식 2와 같이 1차 함수로 근사화될 수 있다.In operation S340, the slave device 220 determines an initial drift value according to the relationship between the offset values and the TOD values sampled in operations S320 to S330. 4 is a graph illustrating a relationship between a TOD value and an offset value. Each point in the graph of FIG. 4 represents offset values y i sampled according to time TOD, x i in step S330, and it can be seen that they are in a similar relationship to the linear function. Therefore, the TOD and the offset may be approximated by a linear function as in Equation 2.

Figure 112011028016621-pat00004
Figure 112011028016621-pat00004

여기서, 1차 계수 값인 a가 드리프트 초기 값이고, b가 초기 오프셋 값이 된다. TOD와 오프셋을 1차 함수 f(x)로 근사화 하기 위해 일 실시예에 따라 최소자승법(Least Square Method)이 사용될 수 있다. 그러나, 이에 한정되는 것은 아니며, 다양한 근사화 방식이 사용될 수 있다. 최소자승법에 의하여 f(x)를 추정하는 경우, a 값 및 b 값은 수학식 3과 같이 산출될 수 있다.Here, the first coefficient a is a drift initial value, and b is an initial offset value. In order to approximate the TOD and the offset to the linear function f (x), the least square method may be used according to an embodiment. However, the present invention is not limited thereto, and various approximation schemes may be used. When f (x) is estimated by the least squares method, the a and b values may be calculated as in Equation 3.

Figure 112011028016621-pat00005
Figure 112011028016621-pat00005

여기서, N은 샘플링 횟수, xi는 i번째 샘플링에서의 TOD 값, yi는 i번째 샘플링에서 오프셋 값을 나타낸다.Where N is the number of sampling, x i is the TOD value in the i th sampling, and y i is the offset value in the i th sampling.

S350 단계에서 슬레이브 장치(220)는 에러 피드백 방식(error feedback mechanism)으로, 슬레이브 장치의 주파수 드리프트 값을 추정한다. 에러 피드백 방식을 적용함에 있어, 종래에는, 드리프트 초기값을 "0"과 같은 임의의 값으로 설정 함으로써, 드리프트 값을 추정하는 시간이 오래 걸리고, 동기화의 지연을 초래한다는 문제점이 있었다. 그러나, 본 실시예에서는 종래의 추정 방식에서와 달리, S340 단계에서 결정된 드리프트 초기값을 사용하므로 추정 시간을 단축시킬 수 있다. 일 실시예에 따라, 에러 피드백 매커니즘은, PI 제어 방식을 포함하나, 이에 한정되는 것은 아니다. In operation S350, the slave device 220 estimates a frequency drift value of the slave device using an error feedback mechanism. In applying the error feedback method, conventionally, by setting the drift initial value to an arbitrary value such as "0", it takes a long time to estimate the drift value and causes a delay in synchronization. However, in this embodiment, unlike the conventional estimation method, since the drift initial value determined in step S340 is used, the estimation time can be shortened. According to one embodiment, the error feedback mechanism includes, but is not limited to, a PI control scheme.

S360 단계에서 슬레이브 장치(220)는 추정된 드리프트 값을 이용하여 슬레이브 장치(220)의 주파수를 마스터 장치(210)와 동기화한다. 일 실시예에 따라, 슬레이브 장치(220)는 S310 내지 S350 단계에서 산출된 오프셋 값 및 드리프트 값을 이용하여, 자체적으로 발생하는 클럭 신호의 시간 및 주파수를 조정한다. 조정된 클럭 신호는 마스터 장치(210)와 동기화된 클럭 신호로서, 슬레이브 장치(220) 내부 또는 타 슬레이브 장치에서 사용될 수 있다. 개시된 기술에 따르면, 드리프트값을 추정하는 시간이 단축되므로, 슬레이브 장치(220)의 동기화 시간이 단축될 수 있다는 장점이 있다.
In operation S360, the slave device 220 synchronizes the frequency of the slave device 220 with the master device 210 using the estimated drift value. According to an embodiment, the slave device 220 adjusts the time and frequency of the clock signal generated by itself using the offset value and the drift value calculated in steps S310 to S350. The adjusted clock signal is a clock signal synchronized with the master device 210 and may be used in the slave device 220 or in another slave device. According to the disclosed technology, since the time for estimating the drift value is shortened, the synchronization time of the slave device 220 can be shortened.

이러한 개시된 기술인 시스템 및 장치는 이해를 돕기 위하여 도면에 도시된 실시 예를 참고로 설명되었으나, 이는 예시적인 것에 불과하며, 당해 분야에서 통상적 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시 예가 가능하다는 점을 이해할 것이다. 따라서, 개시된 기술의 진정한 기술적 보호범위는 첨부된 특허청구범위에 의해 정해져야 할 것이다.While the system and apparatus disclosed herein have been described with reference to the embodiments shown in the drawings for purposes of clarity of understanding, they are illustrative only and various modifications and equivalent embodiments can be made by those skilled in the art. I will understand that. Accordingly, the true scope of protection of the disclosed technology should be determined by the appended claims.

Claims (6)

슬레이브 장치가 네트워크로 연결된 마스터 장치와 클락(clock)을 동기화하는 방법에 있어서,
상기 마스터 장치와 동기화에 필요한 메시지를 송수신하여 오프셋(offset) 값들 및 TOD(Time of Day) 값들을 샘플링 하는 단계;
상기 샘플링 된 오프셋 값들과 상기 샘플링 된 TOD 값들의 관계에 따라, 드리프트(drift) 초기값을 결정하는 단계; 및
상기 결정된 드리프트 초기값을 사용하여, 에러 피드백 방식(error feedback mechanism)으로, 상기 슬레이브 장치의 주파수 드리프트 값을 추정하는 단계를 포함하는 클락 동기화 방법.
In a method in which a slave device synchronizes its clock with a networked master device,
Sampling offset and time of day (TOD) values by transmitting and receiving a message necessary for synchronization with the master device;
Determining an initial drift value according to the relationship between the sampled offset values and the sampled TOD values; And
Estimating a frequency drift value of the slave device using an error feedback mechanism using the determined drift initial value.
제1항에 있어서,
상기 동기화에 필요한 메시지는, IEEE 1588 프로토콜의 T1(이때, T1은 마스터 장치에서 동기 메시지가 송신된 시점을 나타냄), T2(이때, T2는 슬레이브 장치에서 후속 메시지가 송신된 시점을 나타냄), T3(이때, T3는 슬레이브 장치에서 지연 요청 메시지가 송신된 시점을 나타냄) 또는 T4(이때, T4는 마스터 장치에서 지연 응답 메시지가 송신된 시점) 시간 정보를 포함하고,
상기 오프셋 값은,
Figure 112011028016621-pat00006
(이때, Toffset은 오프셋 값을 나타냄)에 따라 산출되는 클락 동기화 방법.
The method of claim 1,
Messages necessary for the synchronization, T 1 of the IEEE 1588 protocol (wherein, T 1 represents a sync message is sent the time on the master device), T 2 (wherein, T 2 is a subsequent message transmission time point in the slave device indicates), T 3 (wherein, T 3 represents the time delay request message is sent from the slave device), or T 4 (wherein, T 4 includes a time delay response message is sent from the master device), the time information,
The offset value is,
Figure 112011028016621-pat00006
Wherein T offset represents an offset value.
제1항에 있어서,
상기 추정된 드리프트 값을 이용하여 상기 슬레이브 장치의 주파수를 상기 마스터 장치와 동기화하는 단계를 더 포함하는 클락 동기화 방법.
The method of claim 1,
And synchronizing the frequency of the slave device with the master device using the estimated drift value.
제1항에 있어서, 상기 드리프트 초기값은,
상기 샘플링 된 오프셋 값과 상기 샘플링 된 TOD 값 간의 관계 식의 1차 계수 값으로 결정되는 클락 동기화 방법.
The method of claim 1, wherein the initial drift value,
Clock coefficient value of the relationship between the sampled offset value and the sampled TOD value.
제4항에 있어서, 상기 관계 식은,
최소자승법(Least Square Method)에 따라 구해지는 클락 동기화 방법.
The method of claim 4, wherein the relational expression is
The clock synchronization method obtained according to the Least Square Method.
제1항에 있어서, 상기 에러 피드백 매커니즘은,
PI 제어(Proportional-Integral Control) 방식을 포함하는 클락 동기화 방법.
The method of claim 1, wherein the error feedback mechanism is:
Clock synchronization method that includes the Proportional-Integral Control (PI) approach.
KR1020110035240A 2011-04-15 2011-04-15 Method for clock synchronization between slave and master KR101176798B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020110035240A KR101176798B1 (en) 2011-04-15 2011-04-15 Method for clock synchronization between slave and master

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020110035240A KR101176798B1 (en) 2011-04-15 2011-04-15 Method for clock synchronization between slave and master

Publications (1)

Publication Number Publication Date
KR101176798B1 true KR101176798B1 (en) 2012-08-24

Family

ID=46887747

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020110035240A KR101176798B1 (en) 2011-04-15 2011-04-15 Method for clock synchronization between slave and master

Country Status (1)

Country Link
KR (1) KR101176798B1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101498561B1 (en) * 2014-03-10 2015-03-04 국방과학연구소 System and method for can communication based tdma digital technology for global synchronization
WO2016095972A1 (en) * 2014-12-16 2016-06-23 Robert Bosch Gmbh Method of synchronising clocks of network devices
KR101642441B1 (en) * 2016-03-31 2016-07-25 라이트웍스 주식회사 Filtering method and apparatus for precision time protocol
CN113613124A (en) * 2021-04-26 2021-11-05 珠海市杰理科技股份有限公司 TWS master and slave device, audio device and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101498561B1 (en) * 2014-03-10 2015-03-04 국방과학연구소 System and method for can communication based tdma digital technology for global synchronization
WO2016095972A1 (en) * 2014-12-16 2016-06-23 Robert Bosch Gmbh Method of synchronising clocks of network devices
RU2660458C1 (en) * 2014-12-16 2018-07-06 Роберт Бош Гмбх Method for synchronization of clock generators of network devices
US10305616B2 (en) 2014-12-16 2019-05-28 Robert Bosch Gmbh Method of synchronising clocks of network devices
KR101642441B1 (en) * 2016-03-31 2016-07-25 라이트웍스 주식회사 Filtering method and apparatus for precision time protocol
CN113613124A (en) * 2021-04-26 2021-11-05 珠海市杰理科技股份有限公司 TWS master and slave device, audio device and system

Similar Documents

Publication Publication Date Title
AU2014414438B2 (en) Method of synchronising clocks of network devices
KR20090032306A (en) Time synchronization system and method on the network
US10333611B2 (en) Communication system, time synchronization method, and radio relay device
CN104184534B (en) Method for achieving accuracy of transparent clock path delay of IEEE1588 protocol
CN103763055A (en) Method for precise time synchronization
US11252687B2 (en) Remote signal synchronization
WO2013051447A1 (en) Time control device, time control method, and program
KR101550552B1 (en) Apparatus for adjusting time synchronization period and method for determinating time synchronization period
EP2749968A1 (en) Time control device, time control method, and program
KR20170058167A (en) Method and apparatus for synchronizing time
WO2017054554A1 (en) Clock synchronization method, device, and communication apparatus
EP3398272A1 (en) Synchronizing clocks in a network
KR101176798B1 (en) Method for clock synchronization between slave and master
WO2015122027A1 (en) Time synchronization device
JP2012222833A (en) System and method to overcome wander accumulation to achieve precision clock distribution over large networks
JP2017069669A (en) Time synchronizing device, base station device, and time synchronizing method
CN103532693A (en) Time synchronizing device and method
JP6254028B2 (en) Slave node and time synchronization method
JP2021076433A (en) Clock adjustment device, program, and clock adjustment method
JP6198075B2 (en) Time synchronization apparatus, time synchronization method, and time synchronization program
KR102064575B1 (en) Method, apparatus, system and computer program for enhancing the accuracy of Time Synchronization between devices
JP6385849B2 (en) Time synchronization method and time synchronization apparatus
JP2019035591A (en) Time management device, time reference device, reference time management system, and reference time management method
Kim et al. Time synchronization method of IEEE 802.1 AS through automatic optimal sync message period adjustment for in-car network
JP6196765B2 (en) Communication device, time control method, and program

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20160729

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20170802

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20180731

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20190715

Year of fee payment: 8