KR101972798B1 - Network Time Protocol based Time synchronization apparatus and method - Google Patents
Network Time Protocol based Time synchronization apparatus and method Download PDFInfo
- Publication number
- KR101972798B1 KR101972798B1 KR1020170110041A KR20170110041A KR101972798B1 KR 101972798 B1 KR101972798 B1 KR 101972798B1 KR 1020170110041 A KR1020170110041 A KR 1020170110041A KR 20170110041 A KR20170110041 A KR 20170110041A KR 101972798 B1 KR101972798 B1 KR 101972798B1
- Authority
- KR
- South Korea
- Prior art keywords
- time
- error
- ntp
- error correction
- internal
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L7/00—Arrangements for synchronising receiver with transmitter
- H04L7/0008—Synchronisation information channels, e.g. clock distribution lines
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L7/00—Arrangements for synchronising receiver with transmitter
- H04L7/0016—Arrangements for synchronising receiver with transmitter correction of synchronization errors
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
- Electric Clocks (AREA)
Abstract
본 발명은 오차를 최소화한 NTP 시각 동기장치 및 방법에 관한 것으로, 네트워크를 통한 NTP 시각 동기를 사용하는 경우에 오차 및 누적을 최소화하여 시간적 점프를 방지할 수 있도록 한 것이다.The present invention relates to an NTP time synchronization apparatus and method with minimized error, and minimizes errors and accumulation when using NTP time synchronization through a network, thereby preventing temporal jumping.
Description
본 발명은 네트워크에 연결된 장치들간의 시각 동기 기술에 관련한 것으로, 특히 네트워크 시각 프로토콜(Network Time Protocol) 기반의 동기 기술에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a time synchronization technique between devices connected to a network, and more particularly to a synchronization technique based on a Network Time Protocol.
네트워크 장치들간의 정보 교환에 있어서, 또는 어느 한 장치가 다른 장치들로부터 수집된 정보를 정확히 처리하기 위해서 이들 장치의 클럭 혹은 시각의 동기화가 필요하다. 네트워크 시스템에서의 시각 동기 기술로, 예를 들면 GPS 신호와 같은 기준 신호의 수신을 통해 정확한 표준시간을 생성할 수 있는 호스트 장치가 분배하는 일정한 주기의 접점 신호를 통해 각 장치들이 시간을 보정하는 기술이 있다. In the exchange of information between network devices, or in which one device needs to synchronize the clock or time of these devices in order to correctly process the information collected from other devices. In a time synchronizing technique in a network system, a technique in which each device corrects a time through a contact signal of a predetermined period distributed by a host device capable of generating a correct standard time through reception of a reference signal such as a GPS signal .
접점 신호를 분배하여 시간을 보정하는 기술과 관련하여, 본 출원인에 의해 출원되어 2013.07.23자로 등록된 대한민국 등록특허 제10-1290785호에 개시된 기술이 있다. 이 기술은 산출된 오차를 오차 측정 주기 내에서 시스템의 최소 시간 단위씩 수차례 나누어 보정하여 클럭의 급격한 보정에 따른 시간적 점프 현상을 최소화한다. 예를 들어, 외부 동기 장치로부터 펄스 신호가 수신되는 주기가 10sec이고, 그 동안 발생된 오차가 4msec이고, 또 시스템의 최소 시간 단위가 1msec라면, 오차 측정 주기인 10sec 주기 동안에 시스템의 최소 시간 단위인 1msec씩 등간격인 2.5sec 마다 나누어 4차례에 걸쳐 보정한다. There is a technique disclosed in Korean Patent Registration No. 10-1290785, filed by the present applicant and registered on July 23, 2013, with regard to a technique of correcting time by distributing a contact signal. This technique minimizes the temporal jump phenomenon due to the rapid correction of the clock by compensating the calculated error several times by the minimum time unit of the system within the error measurement period. For example, if the period during which the pulse signal is received from the external synchronizing device is 10 sec, the error generated during this period is 4 msec, and the minimum time unit of the system is 1 msec, The correction is performed four times in increments of 1 msec every 2.5 seconds, which is equal intervals.
접점 신호를 사용할 수 없거나, 아주 정확한 시각 동기가 필요하지 않은 경우, 네트워크를 통한 NTP(Network Time Protocol)를 사용하여 시각을 동기화하는 방식이 있다. 본 명세서에서 NTP 방식이라 함은 클라이언트-서버, 혹은 피어-투-피어(peer-to-peer) 방식으로 시각 정보, 예를 들면 표준 프로토콜에서 타임스탬프(timestamps)라고 부르는 패킷의 전송과 수신에 의해 이루어지는 네트워크 단말들간의 시각 동기화 기술을 의미한다. 따라서 NTP 방식이라는 용어는 하나의 표준을 지칭한다기 보다 네트워크를 통해 시간 정보를 담은 패킷의 분배나 전달을 통해 네트워크 단말들간의 시각을 동기화시키는 기술을 지칭한다. In a case where the contact signal can not be used, or when a very precise time synchronization is not required, there is a method of synchronizing the time using NTP (Network Time Protocol) over the network. In this specification, the NTP method refers to transmission and reception of time information in a client-server or a peer-to-peer manner, for example, a packet called a timestamp in a standard protocol Means a time synchronization technique between the network terminals. Thus, the term NTP refers to a technique for synchronizing the time between network terminals through distribution or delivery of packets containing time information over a network rather than a standard.
이러한 NTP방식의 시각 동기 기술은 네트워크의 상태에 따라 오차가 발생하며, 이러한 오차를 가지고 있는 시간을 즉시 적용하는 경우 NTP의 응답을 받을 때마다 다른 시간으로 설정되어, 시간축이 흔들리고 이로 인한 시간적 점프 현상이 발생하게 된다. 즉, NTP 방식의 경우 어떤 단말의 시각 동기 오차는 그 단말의 내부 요인으로도 발생하지만, 네트워크상의 전송 경로에서 불규칙하게 발생하는 지연이나 장애에 의해 발생할 수 있고, 이러한 오차가 급격히 변동할 경우 그 변화를 위의 선특허에 개시된 정도로 급격히 쫓아가면 시각 동기 장치의 시간적 점프 현상이 여전히 생길 수 있다.The time synchronization technique of the NTP scheme generates an error according to the state of the network. If the time having the error is immediately applied, the time synchronization is set to a different time each time the NTP response is received. . That is, in the case of the NTP scheme, a time synchronization error of a terminal occurs as an internal factor of the terminal, but may occur due to a delay or an irregular occurrence in a transmission path on a network. When such an error rapidly varies, The time synchronization of the time synchronization device may still occur.
제안된 발명은 NTP 방식의 시각 동기를 사용하는 경우에 오차 및 누적을 최소화하여, 시간적 점프를 방지할 수 있는 NTP 방식의 시각 동기장치 및 방법을 제공함을 그 목적으로 한다.An object of the present invention is to provide a time synchronizing apparatus and method of an NTP system that can minimize time-jumping by minimizing error and accumulation when using NTP-type time synchronization.
제안된 발명의 일 양상에 따르면, NTP 시각 동기장치는 내부시간을 계측하는 내부 타이머와, NTP 서버로부터 표준시간을 수신하는 표준시간 수신부와, 이 표준시간 수신부에 의해 수신된 표준시간과 내부 타이머에 의해 계측된 내부시간을 비교하여 시간 오차를 계산하는 오차 계산부와, 오차 측정 주기의 복수배의 주기를 오차 보정 적용 주기로 결정하는 오차 보정 적용 주기 결정부와, 오차 계산부에 의해 계산된 시간 오차를 최소 시간 단위로 나눈 값으로, 오차 보정 적용 주기 결정부에 의해 결정된 오차 보정 적용 주기를 나눈 시간 간격으로, 내부 타이머에 의해 계측된 내부시간을 최소 시간 단위씩 분산하여 오차 보정하는 오차 보정부를 포함한다.According to an aspect of the present invention, an NTP time synchronization apparatus includes an internal timer for measuring an internal time, a standard time receiver for receiving a standard time from an NTP server, and a timer for receiving a standard time and an internal timer received by the standard time receiver An error correction period determination unit for determining a period of a plurality of times of the error measurement period as an error correction application period; a time error calculation unit for calculating a time error calculated by the error calculation unit; Is divided into a minimum time unit and an error correction unit that corrects an error by distributing the internal time measured by the internal timer by a minimum time unit at a time interval obtained by dividing the error correction application period determined by the error correction application period determining unit do.
본 발명의 부가적인 양상에 따르면, 오차 측정 주기가 NTP 서버로부터 표준시간을 수신하는 주기일 수 있다.According to a further aspect of the present invention, the error measurement period may be a period of receiving standard time from an NTP server.
본 발명의 부가적인 양상에 따르면, 오차 보정부가 오차 계산부에 의해 계산된 시간 오차가 오차 측정 주기 이상인 경우, 표준시간 수신부에 의해 수신된 표준시간으로 내부시간을 변경할 수 있다.According to a further aspect of the present invention, when the time error calculated by the error calculator is equal to or greater than the error measurement period, the internal time can be changed to the standard time received by the standard time receiver.
본 발명의 또 다른 양상에 따르면, 오차를 최소화한 NTP 시각 동기방법이 NTP 시각 동기장치가 NTP 서버로부터 표준시간을 수신하는 표준시간 수신단계와, NTP 시각 동기장치가 표준시간 수신단계에 의해 수신된 표준시간과 내부 타이머에 의해 계측된 내부시간을 비교하여 시간 오차를 계산하는 오차 계산단계와, NTP 시각 동기장치가 오차 계산단계에 의해 계산된 시간 오차를 최소 시간 단위로 나눈 값으로, 오차 보정 적용 주기를 나눈 시간 간격으로, 내부 타이머에 의해 계측된 내부시간을 최소 시간 단위씩 분산하여 오차 보정하는 오차 보정단계를 포함한다.According to another aspect of the present invention, an NTP time synchronization method minimizing an error includes a standard time reception step in which the NTP time synchronization device receives a standard time from an NTP server, and a step in which the NTP time synchronization device receives An error calculation step of calculating a time error by comparing the standard time and the internal time measured by the internal timer, and a step of calculating an error correction value by dividing the time error calculated by the NTP time synchronization device by the minimum time unit And an error correction step of performing error correction by distributing the internal time measured by the internal timer by a minimum time unit at a time interval obtained by dividing the period.
본 발명의 부가적인 양상에 따르면, 오차를 최소화한 NTP 시각 동기방법이 NTP 시각 동기장치가 오차 측정 주기의 복수배의 주기를 오차 보정 적용 주기로 결정하는 오차 보정 적용 주기 결정단계를 더 포함할 수 있다.According to a further aspect of the present invention, the NTP time synchronization method in which the error is minimized may further include an error correction application period determination step in which the NTP time synchronization device determines a plurality of cycles of the error measurement period as the error correction application period .
본 발명의 부가적인 양상에 따르면, 오차 측정 주기가 NTP 서버로부터 표준시간을 수신하는 주기일 수 있다.According to a further aspect of the present invention, the error measurement period may be a period of receiving standard time from an NTP server.
본 발명의 부가적인 양상에 따르면, 오차 보정단계에서 NTP 시각 동기장치가 오차 계산단계에 의해 계산된 시간 오차가 오차 측정 주기 이상인 경우, 표준시간 수신단계에 의해 수신된 표준시간으로 내부시간을 변경할 수 있다.According to a further aspect of the present invention, in the error correction step, when the time error calculated by the error calculation step of the NTP time synchronization device is equal to or greater than the error measurement period, the internal time can be changed to the standard time received by the standard time reception step have.
본 발명은 네트워크를 통한 NTP 시각 동기를 사용하는 경우에 오차 및 누적을 최소화하여 시간적 점프를 방지할 수 있으므로, 신뢰성 있는 시각 동기가 가능한 효과가 있다. The present invention minimizes errors and accumulation in the case of using NTP time synchronization through a network, thereby preventing temporal jumping, thereby enabling reliable time synchronization.
도 1 은 본 발명에 따른 NTP 시각 동기 시스템의 네트워크 구성도이다.
도 2 는 본 발명에 따른 오차를 최소화한 NTP 시각 동기장치의 일 실시예의 구성을 도시한 블럭도이다.
도 3 은 본 발명에 따른 오차를 최소화한 NTP 시각 동기장치의 시간 오차 보정을 설명하기 위한 도면이다.
도 4 는 본 발명에 따른 오차를 최소화한 NTP 시각 동기방법의 일 실시예의 구성을 도시한 흐름도이다.1 is a network configuration diagram of an NTP time synchronization system according to the present invention.
FIG. 2 is a block diagram showing a configuration of an embodiment of an NTP time synchronization apparatus minimizing an error according to the present invention.
FIG. 3 is a view for explaining a time error correction of the NTP time synchronizer in which the error according to the present invention is minimized.
FIG. 4 is a flowchart showing a configuration of an embodiment of an NTP time synchronization method in which an error according to the present invention is minimized.
이하, 첨부된 도면을 참조하여 기술되는 바람직한 실시예를 통하여 본 발명을 당업자가 용이하게 이해하고 재현할 수 있도록 상세히 기술하기로 한다. 특정 실시예들이 도면에 예시되고 관련된 상세한 설명이 기재되어 있으나, 이는 본 발명의 다양한 실시예들을 특정한 형태로 한정하려는 것은 아니다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. While specific embodiments have been illustrated and described in the accompanying drawings, it is not intended that the various embodiments of the invention be limited to any particular form.
본 발명을 설명함에 있어 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명 실시예들의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다.In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해될 수 있어야 할 것이다. 이하, 첨부된 도면을 참조하여 제안된 발명의 양상들이 구현된 다양한 실시예에 따른 전자 장치에 대해서 설명한다. It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between. Hereinafter, an electronic device according to various embodiments in which aspects of the proposed invention are implemented will be described with reference to the accompanying drawings.
도 1 은 본 발명에 따른 NTP 시각 동기 시스템의 네트워크 구성도이다. 도 1 에 도시한 바와 같이, 본 발명에 따른 NTP 시각 동기 시스템은 NTP(Network Time Protocol) 기반 시각 동기를 수행하는 NTP 시각 동기장치(100)를 탑재하는 적어도 하나의 전자장치(10)와, 전자장치(10)로 정확한 표준시간을 제공하는 GM(Grand Master)으로 동작하는 NTP 서버(20)가 네트워크를 통해 연결되어 구성된다.1 is a network configuration diagram of an NTP time synchronization system according to the present invention. As shown in FIG. 1, the NTP time synchronization system according to the present invention includes at least one
NTP(Network Time Protocol)는 네트워크상에서 클라이언트(전자장치)와 서버(NTP 서버) 사이에 시간 동기화를 위해 쓰는 프로토콜로, 전자장치는 시간 동기화를 위해 NTP 서버에서 정확한 표준시간 정보를 받아 전자장치 내부시간을 보정한다.NTP (Network Time Protocol) is a protocol used for time synchronization between a client (electronic device) and a server (NTP server) on a network. An electronic device receives accurate standard time information from an NTP server for time synchronization, .
NTP를 사용하는 시각 동기는 네트워크의 상태에 따라 오차가 발생하며, 이러한 오차를 가지고 있는 시간을 전자장치(10)에서 즉시 적용하는 경우 NTP의 응답을 받을 때마다 다른 시간으로 설정되어, 시간축이 흔들리고 이로 인한 시간적 점프 현상이 발생하게 된다.The time synchronization using the NTP causes an error according to the state of the network. When the time having the error is immediately applied to the
즉, NTP를 사용하는 경우의 시각 동기 오차는 전자장치(10)에 탑재되는 NTP 시각 동기장치(100) 내부 요인으로도 발생하지만, 네트워크상에서 불규칙하게 발생하는 지연에 의해 발생할 수 있고, 이러한 오차가 급격히 변동할 경우 그 변화를 급격히 쫓아가면서 오차를 보정할 경우 전자장치(10)에 탑재되는 NTP 시각 동기장치(100)의 시간적 점프 현상이 생길 수 있다. That is, the time synchronization error in the case of using the NTP may be caused by an internal factor of the NTP
따라서, 네트워크를 통한 NTP 시각 동기를 하는 경우에 오차 및 누적을 최소화하여, 시간적 점프를 방지할 수 있는 NTP 시각 동기장치를 도 2 를 통해 알아본다.Accordingly, an NTP time synchronization apparatus capable of minimizing errors and accumulation in case of NTP time synchronization via a network and preventing a temporal jump will be described with reference to FIG.
도 2 는 본 발명에 따른 오차를 최소화한 NTP 시각 동기장치의 일 실시예의 구성을 도시한 블럭도이다. 이 실시예에 따른 오차를 최소화한 NTP 시각 동기장치(100)는 정확한 표준시간을 제공하는 GM(Grand Master)으로 동작하는 NTP 서버(20)로부터 표준시간을 수신하는 전자장치(10)에 탑재되어 전자장치(10)에서 이용되는 내부시간을 표준시간을 이용해 보정한다.FIG. 2 is a block diagram showing a configuration of an embodiment of an NTP time synchronization apparatus minimizing an error according to the present invention. The NTP
예컨대, 전자장치(10)가 원자력 발전소의 분산 제어 시스템을 구성하는 장비들일 수 있고, 오차를 최소화한 NTP 시각 동기장치(100)가 원자력 발전소의 분산 제어 시스템을 구성하는 장비들에 탑재되어 장비 내부시간을 표준시간을 기반으로 보정하도록 구현될 수 있다. For example, the
도 2 에 도시한 바와 같이, 이 실시예에 따른 오차를 최소화한 NTP 시각 동기장치(100)는 내부 타이머(110)와, 표준시간 수신부(120)와, 오차 계산부(130)와, 오차 보정 적용 주기 결정부(140)와, 오차 보정부(150)를 포함하여 이루어진다.2, the NTP
내부 타이머(110)는 내부시간을 계측한다. 내부 타이머(110)는 내부에 시계를 가지고, 이 시계를 이용해 시간을 계측하여 시간 정보를 출력한다. 내부 타이머(110) 내부의 시계는 오차 보정이 거의 필요없는 원자 시계와 같은 매우 정밀한 시계가 사용될 수도 있으나, 비용적인 문제 등에 의해 정밀하지 않은 시계가 사용되고, 표준시간을 이용한 오차 보정을 통해 내부시간을 표준시간에 동기화 한다.The
표준시간 수신부(120)는 NTP 서버로부터 표준시간을 수신한다. 내부 타이머(110)의 내부 요인에 의해 시간이 지남에 따라 내부시간에 오차가 발생하고, 이 오차를 보정하기 위해 정확한 표준시간이 필요하고, 정확한 표준시간을 표준시간 수신부(120)를 통해 NTP 서버로부터 수신한다.The standard
이 때, 오차를 최소화한 NTP 시각 동기장치(100)가 능동적으로 NTP 서버로 표준시간을 주기적으로 요청하여 NTP 서버로 표준시간을 수신하도록 구현될 수도 있고, NTP 서버가 표준시간을 주기적으로 오차를 최소화한 NTP 시각 동기장치(100)로 전송하여 오차를 최소화한 NTP 시각 동기장치(100)가 수동적으로 표준시간을 수신하도록 구현될 수도 있다.In this case, the NTP
오차 계산부(130)는 표준시간 수신부(120)에 의해 수신된 표준시간과 내부 타이머(110)에 의해 계측된 내부시간을 비교하여 시간 오차를 계산한다.The
표준시간 수신부(120)에 의해 수신된 표준시간은 NTP 서버가 표준시간을 전송한 시점의 표준시간이고, 내부 타이머(110)에 의해 계측된 내부시간은 NTP 서버로부터 표준시간이 수신된 시점의 내부시간이므로, 표준시간과 내부시간은 시간 오차가 발생하고, 이 시간 차이는 내부 타이머(110) 자체 요인과 표준시간이 전달되는 네트워크 지연 등과 같은 외부 요인에 의해 기인한다.The standard time received by the
오차 보정 적용 주기 결정부(140)는 오차 측정 주기의 복수배의 주기를 오차 보정 적용 주기로 결정한다. 이 때, 오차 측정 주기가 NTP 서버로부터 표준시간을 수신하는 주기일 수 있다.The error correction application
NTP 기반 시각 동기는 네트워크의 상태에 따라 오차가 발생하며, 이러한 오차를 가지고 있는 시간을 전자장치(10)에서 즉시 적용하는 경우 NTP의 응답을 받을 때마다 다른 시간으로 설정되어, 시간축이 흔들리고 이로 인한 시간적 점프 현상이 발생하게 된다.In case of applying the time having the error to the
즉, NTP를 사용하는 경우의 시각 동기 오차는 전자장치(10)에 탑재되는 NTP 시각 동기장치(100) 내부 요인으로도 발생하지만, 네트워크상에서 불규칙하게 발생하는 지연에 의해 발생할 수 있고, 이러한 오차가 급격히 변동할 경우 그 변화를 급격히 쫓아가면서 오차를 보정할 경우 전자장치(10)에 탑재되는 NTP 시각 동기장치(100)의 시간적 점프 현상이 생길 수 있다. That is, the time synchronization error in the case of using the NTP may be caused by an internal factor of the NTP
이를 방지하기 위해, 오차 보정 적용 주기 결정부(140)를 통해 오차 측정 주기의 복수배의 주기를 오차 보정 적용 주기로 결정한다. 예컨대, 오차 측정 주기가 T라면, 오차 보정 적용 주기 결정부(140)를 통해 결정되는 오차 보정 적용 주기는 nT가 된다. 이 때, n은 2 이상의 자연수이며, 네트워크 변동 요인이 클 경우에는 크게, 네트워크 변동 요인이 작을 경우에는 작게 설정될 수 있다.In order to prevent this, an error correction application
오차 보정부(150)는 오차 계산부(130)에 의해 계산된 시간 오차를 최소 시간 단위로 나눈 값으로, 오차 보정 적용 주기 결정부(140)에 의해 결정된 오차 보정 적용 주기를 나눈 시간 간격으로, 내부 타이머(110)에 의해 계측된 내부시간을 최소 시간 단위씩 분산하여 오차 보정한다.The
이를 식으로 표현하면, 오차 계산부(130)에 의해 계산된 시간 오차가 t, 최소 시간 단위가 u라면, 오차 보정 간격은 d = nT / (t/u) = nTu / t가 되고, 오차 보정부(150)를 통해 오차 보정 간격 d 마다 최소 시간 단위 u 시간만큼 보정한다.If the time error calculated by the
도 3 은 본 발명에 따른 오차를 최소화한 NTP 시각 동기장치의 시간 오차 보정을 설명하기 위한 도면이다. 예를 들면, 오차 측정 주기가 10sec, 오차 보정 적용 주기가 오차 측정 주기의 3배수인 30sec, 계산된 시간 오차가 6msec, 최소 시간 단위가 1msec라면, 오차 보정 간격은 d = 3*10sec*(1msec/6msec) = 5sec가 된다.FIG. 3 is a view for explaining a time error correction of the NTP time synchronizer in which the error according to the present invention is minimized. For example, if the error measurement period is 10 sec, the error correction application period is 3 times the error measurement period, 30 sec, the calculated time error is 6 msec, and the minimum time unit is 1 msec, then the error correction interval is d = 3 * 10 sec * / 6 msec) = 5 sec.
이론적으로, 오차 보정 적용 주기 30sec 동안 5sec 간격으로 최소 시간 단위 1msec씩 6번 내부시간의 오차가 보정되어야 하나, 오차 측정 주기가 10sec이므로, 5sec 간격으로 최소 시간 단위 1msec씩 2번 내부시간이 총 2msec 보정되면, 다음 표준시간이 수신되므로, 현재의 내부시간 오차 보정은 중단되고, 새로운 표준시간 수신시점부터 새로운 표준시간과 이전의 오차 보정된 내부시간을 이용해 위와 같은 방식으로 다시 새로운 오차 보정 과정이 진행된다.Theoretically, the error of 6 times internal time should be corrected by 5 msec intervals in 5 sec intervals. However, since the error measurement interval is 10 secs, 2 msec internal time in 5 ms intervals and 1 msec minimum in 2 msec When the next standard time is corrected, the current internal time error correction is stopped and a new error correction process is performed again in the same manner as above using the new standard time and the previous error-corrected internal time from the new standard time reception time do.
새로운 표준시간과 이전의 오차 보정된 내부시간의 오차가 4msec라면, 오차 보정 간격은 d = 3*10sec*(1msec/4msec) = 7.5sec가 되고, 다음 표준 시간이 수신될 때까지, 7.5sec 간격으로 최소 시간 단위 1msec씩 1번 내부시간이 1msec 보정된다.If the error between the new standard time and the previous error corrected internal time is 4 msec, the error correction interval becomes d = 3 * 10 sec * (1 msec / 4 msec) = 7.5 sec. The internal time is corrected by 1 msec in 1 msec minimum time unit.
이와 같은 내부시간 오차 보정 과정을 계속 반복하면, 기존의 접점방식 시각 동기와 같이 정교한 시각 동기는 할 수 없는 NTP 기반 시각 동기의 오차가 최소화되고 누적되지 않아 NTP 시각 동기장치의 시각적 점프가 발생하지 않아, 오차가 최소화된 NTP 시각 동기를 이룰 수 있다.If the internal time error correction process is continuously repeated, the error of the NTP-based time synchronization which can not be precisely synchronized with the conventional contact-type time synchronization is minimized and accumulated, so that the visual jump of the NTP time synchronizer does not occur , NTP time synchronization with minimized error can be achieved.
한편, 발명의 부가적인 양상에 따르면, 오차 보정부(150)가 오차 계산부(130)에 의해 계산된 시간 오차가 오차 측정 주기 이상인 경우, 표준시간 수신부(120)에 의해 수신된 표준시간으로 내부시간을 변경하도록 구현될 수 있다.According to a further aspect of the present invention, when the time error calculated by the
이 경우는, 오차 계산부(130)에 의해 계산된 시간 오차가 오차 측정 주기 이상이어서 표준시간과 내부시간 차이가 너무 커 NTP 오차 보정을 통해 내부시간을 표준시간과 동기화할 의미가 없는 경우이므로, 이 경우는 표준시간 수신부(120)에 의해 수신된 표준시간으로 내부시간을 변경하여 NTP 시각 동기장치의 내부시간을 초기화하도록 한 것이다.In this case, since the time error calculated by the
이상에서 설명한 바와 같은 본 발명에 따른 오차를 최소화한 NTP 시각 동기장치의 NTP 시각 동기 동작을 도 4 를 통해 알아본다. 도 4 는 본 발명에 따른 오차를 최소화한 NTP 시각 동기방법의 일 실시예의 구성을 도시한 흐름도이다.The NTP time synchronization operation of the NTP time synchronization apparatus minimizing the error according to the present invention as described above will be described with reference to FIG. FIG. 4 is a flowchart showing a configuration of an embodiment of an NTP time synchronization method in which an error according to the present invention is minimized.
먼저, 표준시간 수신단계(210)에서 NTP 시각 동기장치가 NTP 서버로부터 표준시간을 수신한다. 표준시간 수신과 관련해서는 기 설명하였으므로, 중복 설명은 생략한다.First, in the standard
그 다음, 오차 계산단계(220)에서 NTP 시각 동기장치가 표준시간 수신단계(210)에 의해 수신된 표준시간과 내부 타이머에 의해 계측된 내부시간을 비교하여 시간 오차를 계산한다. 시간 오차 계산과 관련해서는 기 설명하였으므로, 중복 설명은 생략한다.Next, in the
그 다음, 오차 보정단계(230)에서 NTP 시각 동기장치가 오차 계산단계(220)에 의해 계산된 시간 오차를 최소 시간 단위로 나눈 값으로, 오차 보정 적용 주기를 나눈 시간 간격으로, 내부 타이머에 의해 계측된 내부시간을 최소 시간 단위씩 분산하여 오차 보정한다. 내부시간 오차 보정과 관련해서는 기 설명하였으므로, 중복 설명은 생략한다.Then, in the
한편, 발명의 부가적인 양상에 따르면, 오차를 최소화한 NTP 시각 동기방법이 오차 보정 적용 주기 결정단계(225)를 더 포함할 수 있다. 오차 보정 적용 주기 결정단계(225)에서 NTP 시각 동기장치가 오차 측정 주기의 복수배의 주기를 오차 보정 적용 주기로 결정한다. 이 때, 오차 측정 주기가 NTP 서버로부터 표준시간을 수신하는 주기일 수 있다. 오차 보정 적용 주기 결정과 관련해서는 기 설명하였으므로, 중복 설명은 생략한다.According to a further aspect of the present invention, the NTP time synchronization method minimizing the error may further include an error correction application period determination step (225). In the error correction application
이와 같이 구현함에 의해 본 발명은 네트워크를 통한 NTP 시각 동기를 사용하는 경우에 오차 및 누적을 최소화하여 시간적 점프를 방지할 수 있으므로, 신뢰성 있는 시각 동기가 가능하다.By implementing such a configuration, the present invention minimizes errors and accumulation in the case of using NTP time synchronization over a network, thereby preventing temporal jumping, thereby enabling reliable time synchronization.
한편, 발명의 부가적인 양상에 따르면, 오차 보정단계(230)에서 NTP 시각 동기장치가 오차 계산단계(220)에 의해 계산된 시간 오차가 오차 측정 주기 이상인 경우, 표준시간 수신단계(210)에 의해 수신된 표준시간으로 내부시간을 변경하도록 구현될 수 있다.According to a further aspect of the invention, in the
이 경우는, 오차 계산단계(220)에 의해 계산된 시간 오차가 오차 측정 주기 이상이어서 표준시간과 내부시간 차이가 너무 커 NTP 오차 보정을 통해 내부시간을 표준시간과 동기화할 의미가 없는 경우, 표준시간 수신단계(210)에 의해 수신된 표준시간으로 내부시간을 변경하여 NTP 시각 동기장치의 내부시간을 초기화하여 내부시간을 표준시간에 맞도록 한 것이다.In this case, if the time error calculated by the
이상에서 설명한 바와 같이, 본 발명은 네트워크를 통한 NTP 시각 동기를 사용하는 경우에 오차 및 누적을 최소화하여 시간적 점프를 방지함으로써, 신뢰성 있는 시각 동기가 가능하므로, 상기에서 제시한 본 발명의 목적을 달성할 수 있다. As described above, the present invention minimizes error and accumulation in the case of using NTP time synchronization through a network to prevent temporal jumping, thereby enabling reliable time synchronization. Therefore, can do.
본 발명의 다양한 실시예에 따른 장치(예: 모듈들 또는 그 기능들) 또는 방법(예: 동작들)의 적어도 일부는, 예컨대, 프로그래밍 모듈의 형태로 컴퓨터로 읽을 수 있는 저장매체(Computer-Readable Storage Media)에 저장된 명령어로 구현될 수 있다. At least a portion of a device (e.g., modules or functions thereof) or a method (e.g., operations) according to various embodiments of the present invention may be stored in a computer-readable storage medium Storage Media).
명령어는, 하나 이상의 프로세서에 의해 실행될 경우, 하나 이상의 프로세서가 명령어에 해당하는 기능을 수행할 수 있다. 컴퓨터로 읽을 수 있는 저장매체는 프로그래밍 모듈의 적어도 일부는, 예를 들면, 프로세서에 의해 구현(Implement)(예: 실행)될 수 있다. 프로그래밍 모듈의 적어도 일부는 하나 이상의 기능을 수행하기 위한, 예를 들면, 모듈, 프로그램, 루틴, 명령어 세트(Sets of Instructions) 또는 프로세스 등을 포함할 수 있다.An instruction, when executed by one or more processors, may perform one or more functions corresponding to the instruction. A computer-readable storage medium may be implemented (e.g., implemented) by at least a portion of a programming module, for example, by a processor. At least some of the programming modules may include, for example, modules, programs, routines, sets of instructions, or processes for performing one or more functions.
그리고, 본 명세서 및 도면에 개시된 다양한 실시예들은 이해를 돕기 위해 특정 예를 제시한 것일 뿐이며, 본 발명의 다양한 실시예들의 범위를 한정하고자 하는 것은 아니다. 따라서, 본 발명의 다양한 실시예들의 범위는 여기에서 설명된 실시예들 이외에도 본 발명의 다양한 실시예들의 기술적 사상을 바탕으로 도출되는 모든 변경 또는 변형된 형태가 본 발명의 다양한 실예들의 범위에 포함되는 것으로 해석되어야 한다.It is to be understood that the various embodiments disclosed in the present specification and drawings are only illustrative of specific examples for the purpose of understanding and are not intended to limit the scope of various embodiments of the present invention. Accordingly, the scope of the various embodiments of the present invention should not be limited to the above-described embodiments, and all changes or modifications derived from the technical ideas of various embodiments of the present invention are included in the scope of various embodiments of the present invention .
본 발명은 시각 동기 기술분야 및 이의 응용 기술분야에서 산업상으로 이용 가능하다.INDUSTRIAL APPLICABILITY The present invention is industrially applicable in the field of time synchronization technology and its application technology.
10 : 전자장치
20 : NTP 서버
100 : NTP 시각 동기장치
110 : 내부 타이머
120 : 표준시간 수신부
130 : 오차 계산부
140 : 오차 보정 적용 주기 결정부
150 : 오차 보정부10: Electronic device
20: NTP server
100: NTP time synchronization device
110: internal timer
120: Standard time receiver
130:
140: error correction application period determining unit
150: error correction unit
Claims (7)
NTP 서버로부터 표준시간을 수신하는 표준시간 수신부와;
표준시간 수신부에 의해 수신된 표준시간과 내부 타이머에 의해 계측된 내부시간을 비교하여 시간 오차(t)를 계산하는 오차 계산부와;
NTP 서버로부터 표준시간을 수신하는 주기인 오차 측정 주기(T) 간격으로 시간 오차를 보정할 경우 발생하는 시각적 점프 현상을 방지하기 위해, 오차 측정 주기의 복수배의 주기를 오차 보정 적용 주기(nT)로 결정하는 오차 보정 적용 주기 결정부와;
오차 보정 적용 주기 결정부에 의해 결정된 오차 보정 적용 주기(nT)를, 오차 계산부에 의해 계산된 시간 오차(t)를 최소 시간 단위(u)로 나눈 값인 오차 보정 횟수(t/u)로 나누어 오차 보정 간격(d = nT/(t/u))을 계산하고, 내부 타이머에 의해 계측된 내부시간을 오차 보정 적용 주기(nT) 동안, 실제 오차 보정 주기인 오차 보정 간격(d) 마다, 최소 시간 단위(u)씩 오차 보정하는 오차 보정부를;
포함하는 오차를 최소화한 NTP 시각 동기장치.An internal timer for measuring an internal time;
A standard time receiver for receiving standard time from an NTP server;
An error calculator for calculating a time error t by comparing the standard time received by the standard time receiver with the internal time measured by the internal timer;
In order to prevent the visual jumping phenomenon occurring when the time error is corrected at intervals of the error measurement period (T), which is the period of receiving the standard time from the NTP server, the error correction period (nT) An error correction applying period determining unit for determining an error correction applying period;
The error correction application period nT determined by the error correction application period determination unit is divided by the error correction number t / u, which is a value obtained by dividing the time error t calculated by the error calculation unit by the minimum time unit u (T / u)), and calculates an internal time measured by the internal timer for each of the error correction intervals (d) during the error correction application period (nT) An error correcting unit for correcting an error by time unit (u);
NTP time synchronizer with minimized error.
오차 보정부가:
오차 계산부에 의해 계산된 시간 오차가 오차 측정 주기 이상인 경우, 표준시간 수신부에 의해 수신된 표준시간으로 내부시간을 변경하는 오차를 최소화한 NTP 시각 동기장치.The method according to claim 1,
Error correction section:
An NTP time synchronizer that minimizes an error in changing the internal time to the standard time received by the standard time receiver when the time error calculated by the error calculator is equal to or greater than the error measurement period.
NTP 시각 동기장치가 표준시간 수신단계에 의해 수신된 표준시간과 내부 타이머에 의해 계측된 내부시간을 비교하여 시간 오차(t)를 계산하는 오차 계산단계와;
NTP 서버로부터 표준시간을 수신하는 주기인 오차 측정 주기(T) 간격으로 시간 오차를 보정할 경우 발생하는 시각적 점프 현상을 방지하기 위해, NTP 시각 동기장치가 오차 측정 주기의 복수배의 주기를 오차 보정 적용 주기(nT)로 결정하는 오차 보정 적용 주기 결정단계와;
NTP 시각 동기장치가 오차 보정 적용 주기 결정단계에 의해 결정된 오차 보정 적용 주기(nT)를, 오차 계산단계에 의해 계산된 시간 오차(t)를 최소 시간 단위(u)로 나눈 값인 오차 보정 횟수(t/u)로 나누어 오차 보정 간격(d = nT/(t/u))을 계산하고, 내부 타이머에 의해 계측된 내부시간을 오차 보정 적용 주기(nT) 동안, 실제 오차 보정 주기인 오차 보정 간격(d) 마다, 최소 시간 단위(u)씩 오차 보정하는 오차 보정단계를;
포함하는 오차를 최소화한 NTP 시각 동기방법.A standard time receiving step in which the NTP time synchronization device receives a standard time from an NTP server;
An error calculation step of calculating a time error t by comparing the standard time received by the NTP time synchronizer with the internal time measured by the internal timer;
In order to prevent the visual jumping phenomenon occurring when the time error is corrected at the intervals of the error measurement period (T), which is the period of receiving the standard time from the NTP server, the NTP time synchronizer adjusts a plurality of cycles of the error measurement period as error correction An error correction applying period determining step of determining an application period nT;
The error correction application period nT determined by the NTP time synchronization device in the error correction application period determination step is set to an error correction number t in which the time error t calculated by the error calculation step is divided by the minimum time unit u / u) to calculate an error correction interval (d = nT / (t / u)) and calculate an internal time measured by the internal timer as an error correction interval d), and correcting the error by a minimum time unit (u);
NTP time synchronization method minimizing the error included.
오차 보정단계에서:
NTP 시각 동기장치가 오차 계산단계에 의해 계산된 시간 오차가 오차 측정 주기 이상인 경우, 표준시간 수신단계에 의해 수신된 표준시간으로 내부시간을 변경하는 오차를 최소화한 NTP 시각 동기방법.5. The method of claim 4,
In the error correction step:
Wherein the NTP time synchronization unit minimizes the error of changing the internal time to the standard time received by the standard time reception step when the time error calculated by the error calculation step is equal to or greater than the error measurement period.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170110041A KR101972798B1 (en) | 2017-08-30 | 2017-08-30 | Network Time Protocol based Time synchronization apparatus and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170110041A KR101972798B1 (en) | 2017-08-30 | 2017-08-30 | Network Time Protocol based Time synchronization apparatus and method |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20180080973A KR20180080973A (en) | 2018-07-13 |
KR101972798B1 true KR101972798B1 (en) | 2019-04-26 |
Family
ID=62913817
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020170110041A KR101972798B1 (en) | 2017-08-30 | 2017-08-30 | Network Time Protocol based Time synchronization apparatus and method |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101972798B1 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4937229B2 (en) * | 2008-10-30 | 2012-05-23 | 三菱電機株式会社 | Clock adjusting device and image recording device |
KR101290785B1 (en) * | 2012-04-13 | 2013-07-30 | 주식회사 우리기술 | Apparatus and method for clock synchronization in distributed control system |
KR101716583B1 (en) * | 2015-10-27 | 2017-03-15 | 현대오토에버 주식회사 | Time synchronization server, system and method |
-
2017
- 2017-08-30 KR KR1020170110041A patent/KR101972798B1/en active IP Right Grant
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4937229B2 (en) * | 2008-10-30 | 2012-05-23 | 三菱電機株式会社 | Clock adjusting device and image recording device |
KR101290785B1 (en) * | 2012-04-13 | 2013-07-30 | 주식회사 우리기술 | Apparatus and method for clock synchronization in distributed control system |
KR101716583B1 (en) * | 2015-10-27 | 2017-03-15 | 현대오토에버 주식회사 | Time synchronization server, system and method |
Also Published As
Publication number | Publication date |
---|---|
KR20180080973A (en) | 2018-07-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9671761B2 (en) | Method, time consumer system, and computer program product for maintaining accurate time on an ideal clock | |
US7454648B2 (en) | System and method for calibrating a time of day clock in a computing system node provided in a multi-node network | |
WO2014199729A1 (en) | Distribution device, distribution system, and distribution method | |
JP6419981B2 (en) | Method and apparatus for providing global clock in system | |
US10298345B2 (en) | Clock synchronizaton using codeword marker | |
KR20160078893A (en) | Semiconductor device, electronic device module and network system | |
CN109302255B (en) | Time synchronization control method, device and system and computer readable storage medium | |
US20150142382A1 (en) | Correction parameter calculation device, system, correction parameter calculation method, and computer program | |
CN102480350A (en) | Method and device for time synchronization and maintaining based on frequency deviation estimation | |
KR101550552B1 (en) | Apparatus for adjusting time synchronization period and method for determinating time synchronization period | |
JP6834642B2 (en) | Time correction method | |
US20170279552A1 (en) | Method for determining a propagation time of a telegram in a communication network, and corresponding network components | |
JPWO2020149103A1 (en) | Monitoring system and synchronization method | |
US20180013507A1 (en) | A method for time synchronization of devices in a control network | |
KR101972798B1 (en) | Network Time Protocol based Time synchronization apparatus and method | |
US20200382233A1 (en) | Information processing apparatus and time synchronization method | |
JP2006300963A (en) | Distributed control system | |
JP2011071869A (en) | Clock synchronizing method and packet communication system | |
JP2020077929A (en) | Time distribution device, synchronization system, and program | |
JP6385849B2 (en) | Time synchronization method and time synchronization apparatus | |
JP6907684B2 (en) | Time synchronization device, time synchronization method and time synchronization program | |
JP2007163330A (en) | Time information communication system | |
EP3068076A1 (en) | Automatic determination of asymmetrical delay in transmission networks | |
JP5035383B2 (en) | Distributed control system | |
JP7506784B1 (en) | Time distribution device, synchronization system, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
G15R | Request for early opening | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |