WO2018093046A1 - 비정상 동작 상황을 개선한 gps를 이용하는 장치의 utc 시간 동기 방법 - Google Patents
비정상 동작 상황을 개선한 gps를 이용하는 장치의 utc 시간 동기 방법 Download PDFInfo
- Publication number
- WO2018093046A1 WO2018093046A1 PCT/KR2017/011249 KR2017011249W WO2018093046A1 WO 2018093046 A1 WO2018093046 A1 WO 2018093046A1 KR 2017011249 W KR2017011249 W KR 2017011249W WO 2018093046 A1 WO2018093046 A1 WO 2018093046A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- time
- signal
- value
- module
- utc
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G04—HOROLOGY
- G04C—ELECTROMECHANICAL CLOCKS OR WATCHES
- G04C11/00—Synchronisation of independently-driven clocks
- G04C11/02—Synchronisation of independently-driven clocks by radio
- G04C11/026—Synchronisation of independently-driven clocks by radio the time-piece preparing itself on set times on the reception of the sychronising signal
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S19/00—Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
- G01S19/01—Satellite radio beacon positioning systems transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
- G01S19/13—Receivers
-
- G—PHYSICS
- G04—HOROLOGY
- G04C—ELECTROMECHANICAL CLOCKS OR WATCHES
- G04C11/00—Synchronisation of independently-driven clocks
-
- G—PHYSICS
- G04—HOROLOGY
- G04R—RADIO-CONTROLLED TIME-PIECES
- G04R20/00—Setting the time according to the time information carried or implied by the radio signal
- G04R20/02—Setting the time according to the time information carried or implied by the radio signal the radio signal being sent by a satellite, e.g. GPS
Definitions
- the present invention relates to a time synchronization method, and more particularly, to a method of mounting a global positioning system (GPS) module and synchronizing time of a device based thereon.
- GPS global positioning system
- UTC Universal Time Coordinated
- UART Universal Asynchronous Receiver / Transmitter
- CPU Central Processing Unit
- NMEA National Marine Electronics Association
- a time synchronization module (such as a software module that synchronizes the system clock to UTC time) can synchronize the system clock to UTC time by setting the UTC time value received from the GPS module to the system time.
- the method has the following problems.
- the UTC time value received from the GPS module has a value in seconds, so synchronization of less than seconds (milliseconds, microseconds, nanoseconds) is impossible.
- Timing Error There may be a time difference between when the GPS module acquires the UTC time value and when it is output to the device, and the time synchronization module does not know the standard deviation of the time difference and time differences. Accurate synchronization is not possible.
- Transmission delay occurs when the GPS module transmits data to the time synchronization module.
- a processing delay occurs during the procedure where the time synchronization module processes the NMEA message data received from the GPS module to extract the UTC time value and set it to the system time. (When operating on a preemptive operating system, process scheduling introduces unpredictable delays.)
- the unit of UTC time value provided by the GPS module is in the unit of second level, and there is an unpredictable error between the time when the GPS module first acquired the UTC time value and finally the time point when setting the system time. As such, there is a limit to the exact synchronization of the system clock to UTC time.
- the present invention has been made to solve the above problems, and an object of the present invention is to provide a UTC time synchronization method for synchronizing to UTC time in nano to micro seconds in a specific device / system equipped with a GPS module. .
- a time synchronization method includes: a first setting step of setting, by a processor, a time value in seconds of a system time using a first signal; And a second setting step of setting, by the processor, a time value equal to or less than a second of the system time by using the second signal when the reception time of the first signal and the generation time of the second signal satisfy a specific condition.
- the processor may use the second signal to set a time value less than or equal to seconds of the system time. have.
- the processor may set a time value equal to or less than a second of the system time by using the second signal.
- the second signal is an interrupt signal, and the second setting step may be performed in an interrupt processing routine.
- the first signal may be an NMEA message received from the GPS module
- the second signal may be a PPS signal received from the GPS module.
- the second setting step may further include storing a second signal generation time.
- the first setting step may include: when a difference between the system time at which the first signal is received and the stored second signal generation time is greater than a reference value.
- the first signal may set a time value in seconds of the system time.
- the first setting step may include storing a second time value extracted from the first signal in an internal variable; When the second signal is received, setting the second unit time value + 1 stored in the internal variable as the second unit time value of the system time.
- a system includes a module for generating a first signal and a second signal including time information; And setting a time value in seconds of the system time using the first signal received from the module, and using the second signal received from the module when the reception time of the first signal and the generation time of the second signal satisfy a specific condition. And a processor configured to set a time value equal to or less than a second of a system time.
- FIG. 1 is a block diagram of a system to which the present invention is applicable
- FIG. 2 is a diagram illustrating a normal operation timing situation
- 3 is a diagram illustrating an abnormal operation timing situation
- FIG. 4 is a flowchart provided to explain a time synchronization method according to an embodiment of the present invention.
- FIG. 5 is a diagram illustrating a specific processing procedure in the time synchronization method illustrated in FIG. 4;
- FIG. 8 is a flowchart provided to explain a time synchronization method according to another embodiment of the present invention.
- FIG. 9 is a diagram illustrating in detail a processing procedure according to a time synchronization method according to another embodiment of the present invention.
- FIG. 10 is a flowchart provided to explain a time synchronization method according to another embodiment of the present invention.
- FIG. 11 is a diagram specifically illustrating a processing procedure according to a time synchronization method according to another embodiment of the present invention.
- FIG. 1 is a block diagram of a system to which the present invention is applicable.
- a system to which the present invention is applicable is constructed by connecting a Global Positioning System (GPS) module 110 to a central processing unit (CPU) 120.
- GPS Global Positioning System
- CPU central processing unit
- NMEA National Marine Electronics Association
- NMEA National Marine Electronics Association
- the time synchronization module 130 which is a software module for synchronizing the system clock executed in the CPU 120 to Universal Time Coordinated (UTC) time, may receive and process an NMEA message to obtain a UTC time value.
- UTC Universal Time Coordinated
- the PPS signal pin of the GPS module 110 is connected to the interrupt input of the CPU 120 so that the interrupt processing routine can be called when the PPS signal is generated.
- the PPS is a pulse output by the GPS module 110 every 1 second of UTC, and has an error of several nanoseconds from the actual UTC time.
- GPS timing error is solved as follows.
- the time synchronization module 130 may not know when to output the UTC time acquired by the GPS module 110.
- the normal operation may be performed as shown in FIG. 2, but as shown in FIG. 3, the UTC time may be changed in units of 1 second.
- the UTC second is changed while the GPS module 110 acquires the UTC time value and outputs it (abnormal operation timing), when the time synchronization module 130 acquires the UTC time value, the present time is 'Current UTC-1'. It will have a seconds value of.
- FIG. 4 is a flowchart provided to explain a time synchronization method according to an embodiment of the present invention.
- the time synchronization module 130 transmits the system time (Tcurrent) at the moment of receiving the received NMEA message including the UTC time value.
- Tcurrent system time
- Tpps PPS generation time
- Tdiff Dmsg + Dgps
- Dmsg Transmission delay required for NMEA message to be delivered from GPS module 110 to time synchronization module 130
- Dgps the difference between the actual time generated inside the GPS module 110 and the time stored in the message
- the time synchronization module 130 ignores the corresponding NMEA message (S260). That is, if the calculated time difference is short enough to cause a timing error, the UTC time in the corresponding NMEA message is ignored.
- the transmission delay is about 25 msec.
- the CPU 120 may calculate Dmsg differently based on the baudrate of the serial port. Dgps can be identified or guessed from the product datasheet. For example, it may be 5 msec depending on the product.
- NMEA messages including UTC time values, at least xxZDA, xxRMC, xxGLL, and xxGGA, at least one message is received 25 msec after the PPS occurs.
- the time synchronization module 130 sets the system time using the corresponding NMEA message (S250). That is, if the calculated time difference is longer than the interval where the timing error occurs, the UTC time in the corresponding NMEA message is used.
- step S250 the time synchronization module 130 extracts the UTC time value from the NMEA message, stores the corresponding time in an internal variable (utcTime), and converts the utcTime + 1 second value to the system time in the next PPS interrupt processing routine. Set it.
- FIG. 5 a process of '(Tcurrent-Tpps) > Tdiff' and '(Tcurrent-Tpps) > Tdiff' in the time synchronization method shown in FIG. 4 is illustrated in detail.
- the following abnormal operation may occur.
- Another embodiment of the present invention proposes a method for solving the abnormal operation by the "1)".
- the time synchronization method according to another embodiment of the present invention adds the procedure shown in FIG. 8 between steps S220 and S230 shown in FIG. 4.
- the time synchronization module 130 may be configured with the "system time of the received moment”. The difference in the stored "PPS generation time” is calculated (S222).
- step S260 is performed to ignore the NMEA message.
- step S230 is performed. For example, when the NMEA message reception time is not included in the time period before 990 msec elapses and 1 sec elapses from the previously stored "PPS generation time".
- a method for solving the abnormal operation by "2)" is proposed.
- the time synchronization method according to another embodiment of the present invention adds the procedure shown in FIG. 10 between steps S240 and S250 shown in FIG. 4.
- the time synchronization module 130 calculates a difference between the "current time” and the "previous PPS generation time” before setting the system time (S242).
- step S260 if the calculated time difference is more than 1 second (for example, more than 1.5 seconds) (S244-N), it is determined that the PPS interrupt is missing, and performs step S260, whereby the NMEA message is ignored.
- step S250 is performed, whereby the system time is set.
- FIG. 11 specifically illustrates a processing procedure according to a time synchronization method according to another embodiment of the present invention.
- the system equipped with the GPS module 110 may synchronize the system clock in nano-microsecond units with UTC time.
- a method of synchronizing a system clock in UTC to nanoseconds in UTC time in a system equipped with the GPS module 110 is proposed.
- This technique can be applied to any system using a GPS module without limitation.
- the inventive concept of the present invention can be applied to a WAVE vehicle terminal using GPS and other systems.
- the technical idea of the present invention can be applied to a computer-readable recording medium containing a computer program for performing the functions of the apparatus and method according to the present embodiment.
- the technical idea according to various embodiments of the present disclosure may be implemented in the form of computer readable codes recorded on a computer readable recording medium.
- the computer-readable recording medium can be any data storage device that can be read by a computer and can store data.
- the computer-readable recording medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical disk, a hard disk drive, or the like.
- the computer-readable code or program stored in the computer-readable recording medium may be transmitted through a network connected between the computers.
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Electric Clocks (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
비정상 동작 상황을 개선한 GPS를 이용하는 장치의 UTC 시간 동기 방법이 제공된다. 본 발명의 실시예에 따른 시간 동기 방법은, 프로세서가 제1 신호를 이용하여 시스템 시간의 초 단위 시간 값을 설정하는 제1 설정 단계 및 제1 신호의 수신 시각과 제2 신호의 발생 시각이 특정 조건을 만족하면 프로세서가 제2 신호를 이용하여 시스템 시간의 초 단위 이하의 시간 값을 설정하는 제2 설정 단계를 포함한다. 이에 의해, 나노~마이크로 초 단위의 UTC 시간에 동기화하는 것이 가능해지며, 장치/시스템의 정확도와 성능 향상이 가능해진다.
Description
본 발명은 시간 동기 방법에 관한 것으로, 더욱 상세하게는 GPS(Global Positioning System) 모듈을 장착하고 이를 기반으로 장치의 시간을 동기화하는 방법에 관한 것이다.
일반적으로 GPS 모듈은 GPS 위성으로부터 수신된 정보를 기반으로 UTC(Universal Time Coordinated) 시간 값을 획득(=GPS 모듈의 시계가 UTC 시간과 동기화됨)하며, 이를 UART(Universal Asynchronous Receiver/Transmitter) 등의 인터페이스를 통해 NMEA(National Marine Electronics Association) 메시지 형식으로 GPS 모듈에 연결된 장치의 CPU(Central Processing Unit) 등으로 전달한다.
일반적인 장치 및 시스템에서, 시간 동기 모듈(예: 시스템 시계를 UTC 시간에 동기화시키는 소프트웨어 모듈)은 GPS 모듈로부터 수신된 UTC 시간 값을 시스템 시간으로 설정함으로써 시스템 시계를 UTC 시간에 동기화할 수 있는데, 이러한 방법에는 다음과 같은 문제점이 있다.
- 낮은 분해능: GPS 모듈로부터 수신되는 UTC 시간 값은 초 단위의 값을 가지므로, 초 단위 미만(밀리초, 마이크로 초, 나노 초)의 동기화가 불가능하다.
- GPS 전송타이밍 오차: GPS 모듈이 "UTC 시간 값을 획득한 시점"과 "장치로 출력하는 시점" 사이에 시간 차가 존재할 수 있으며, 시간 동기 모듈은 이 시간차 및 시간 차들의 표준편차를 알지 못하므로, 정확한 동기화가 불가능하다.
- 전송 지연: GPS 모듈이 시간 동기 모듈에 데이터를 전송하는 데 전송 지연이 발생한다.
- 처리 지연: 시간 동기 모듈이 GPS 모듈로부터 전달받은 NMEA 메시지 데이터를 처리하여 UTC 시간 값을 뽑아내고 이를 시스템 시간으로 설정하는 절차 동안의 처리 지연이 발생한다. (선점형 운영체제 기반에서 동작 시, 프로세스 스케줄링으로 인해 예측할 수 없는 지연이 발생한다.)
위와 같이, GPS 모듈이 제공하는 UTC 시간 값의 단위는 초 단위 수준이고, GPS 모듈이 "최초로 UTC 시간 값을 획득한 시점"과 최종적으로 "시스템 시간을 설정하는 시점" 사이에는 예측할 수 없는 오차가 존재하므로, 시스템 시계를 UTC 시간에 정확히 동기화하는 데 한계가 있다.
본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 본 발명의 목적은, GPS 모듈이 장착된 특정 장치/시스템에서 나노~마이크로 초 단위의 UTC 시간에 동기화하는 UTC 시간 동기 방법을 제공함에 있다.
상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른, 시간 동기 방법은, 프로세서가, 제1 신호를 이용하여 시스템 시간의 초 단위 시간 값을 설정하는 제1 설정 단계; 및 제1 신호의 수신 시각과 제2 신호의 발생 시각이 특정 조건을 만족하면, 프로세서가 제2 신호를 이용하여 시스템 시간의 초 단위 이하의 시간 값을 설정하는 제2 설정 단계;를 포함한다.
그리고, 제2 설정 단계는, 제1 신호의 수신 시각과 제2 신호의 발생 시각의 차이가 제1 시간 이하이면, 프로세서가 제2 신호를 이용하여 시스템 시간의 초 단위 이하의 시간 값을 설정할 수 있다.
또한, 제2 설정 단계는, 시스템 시간과 제2 신호의 발생 시각의 차이가 제2 시간 이하이면, 프로세서가 제2 신호를 이용하여 시스템 시간의 초 단위 이하의 시간 값을 설정할 수 있다.
그리고, 제2 신호는, 인터럽트 신호이고, 제2 설정 단계는, 인터럽트 처리 루틴에서 수행될 수 있다.
또한, 제1 신호는, GPS 모듈로부터 수신되는 NMEA 메시지이고, 제2 신호는, GPS 모듈로부터 수신되는 PPS 신호일 수 있다.
그리고, 제2 설정 단계는, 제2 신호 발생 시간을 저장하는 단계;를 더 포함하고, 제1 설정 단계는, 제1 신호가 수신된 시스템 시간과 저장된 제2 신호 발생 시간의 차가 기준 값 보다 크면, 제1 신호를 이용하여 시스템 시간의 초 단위 시간 값을 설정할 수 있다.
또한, 제1 설정 단계는, 제1 신호로부터 추출한 초 단위 시간 값을 내부 변수에 저장하는 단계; 제2 신호가 수신되면, 내부 변수에 저장된 초 단위 시간 값 + 1을 시스템 시간의 초 단위 시간 값으로 설정하는 단계;를 포함할 수 있다.
한편, 본 발명의 다른 실시예에 따른, 시스템은, 시간 정보를 포함하고 있는 제1 신호와 제2 신호를 발생시키는 모듈; 및 모듈로부터 수신한 제1 신호를 이용하여 시스템 시간의 초 단위 시간 값을 설정하고, 제1 신호의 수신 시각과 제2 신호의 발생 시각이 특정 조건을 만족하면 모듈로부터 수신한 제2 신호를 이용하여 시스템 시간의 초 단위 이하의 시간 값을 설정하는 프로세서;를 포함한다.
이상 설명한 바와 같이, 본 발명의 실시예들에 따르면, GPS 모듈이 장착된 특정 장치/시스템에서 나노~마이크로 초 단위의 UTC 시간에 동기화하는 것이 가능해지며, 이에 의해 장치/시스템의 정확도와 성능 향상이 가능해진다.
도 1은 본 발명이 적용 가능한 시스템의 블럭도,
도 2는 정상 동작 타이밍 상황을 나타낸 도면,
도 3은 비정상 동작 타이밍 상황을 나타낸 도면,
도 4는 본 발명의 일 실시예에 따른 시간 동기 방법의 설명에 제공되는 흐름도,
도 5는, 도 4에 도시된 시간 동기 방법에서의 구체적인 처리 과정을 예시한 도면,
도 6 및 도 7은, 추가적인 비정상 동작 타이밍 상황들의 설명에 제공되는 도면들,
도 8은 본 발명의 다른 실시예에 따른 시간 동기 방법의 설명에 제공되는 흐름도,
도 9는 본 발명의 다른 실시예에 따른 시간 동기 방법에 따른 처리 과정을 구체적으로 예시한 도면,
도 10은 본 발명의 또 다른 실시예에 따른 시간 동기 방법의 설명에 제공되는 흐름도, 그리고,
도 11은 본 발명의 또 다른 실시예에 따른 시간 동기 방법에 따른 처리 과정을 구체적으로 예시한 도면이다.
이하에서는 도면을 참조하여 본 발명을 보다 상세하게 설명한다.
도 1은 본 발명이 적용 가능한 시스템의 블럭도이다. 도 1에 도시된 바와 같이, 본 발명이 적용 가능한 시스템은, CPU(Central Processing Unit)(120)에 GPS(Global Positioning System) 모듈(110)을 연결하여 구축한다. 구체적으로, GPS 모듈(110)의 NMEA(National Marine Electronics Association) 메시지 출력 핀과 PPS 신호 핀을 CPU(120)에 연결한다.
이에, CPU(120)에서 실행되는 시스템 시계를 UTC(Universal Time Coordinated) 시간에 동기화시키는 소프트웨어 모듈인 시간 동기 모듈(130)이 NMEA 메시지를 수신 및 처리하여 UTC 시간 값을 얻을 수 있도록 한다.
또한, GPS 모듈(110)의 PPS 신호 핀을 CPU(120)의 인터럽트 입력으로 연결하여, PPS 신호 발생 시 인터럽트 처리 루틴이 호출될 수 있도록 한다. PPS는 GPS 모듈(110)이 정확한 UTC 1초 시점마다 출력하는 펄스로써, 실제 UTC 시간에서 수 나노 초 정도 수준의 오차를 가진다.
도 1에 도시된 시스템의 기본 동작은 다음과 같다.
- Phase1: 시간 동기 모듈(130)이 GPS 모듈(110)로부터 수신한 NMEA 메시지에서 획득한 초 단위 UTC 시간 값을 내부 변수(=utcTime)에 저장해 둔다.
- Phase2: 이후, 시간 동기 모듈(130)은 GPS 모듈(110)로부터 PPS 신호가 수신되면, 인터럽트 처리 루틴에서 내부 변수(=utcTime)에 저장해 둔 초 단위 UTC 시간 값을 시스템 시간으로 설정하고, 마이크로 초 단위 시간 값을 0으로 설정한다.
이를 통해 앞서 기술된 문제점 중 아래 문제점들이 해결 가능하다.
- 전송 지연: 전송 지연 자체는 그대로 존재하나, "전송 시점"과 "시스템 시간 설정 시점"이 각각 Phase1, Phase2로 분리되어 시스템 시간 설정 시점에 전송 지연이 누적되어 적용되지 않는다.
- 처리 지연: 처리 지연 자체는 그대로 존재하나, "NMEA 메시지 파싱 및 UTC 시간 값 획득시점"과 "시스템 시간 설정 시점"이 각각 Phase1, Phase2로 분리되어 시스템 시간 설정 시점에 처리 지연이 누적되어 적용되지 않으며, 시스템 시간 설정 동작을 인터럽트 처리 루틴에서 수행하므로, 타 프로세스에 의해 선점되지 않아 지연이 매우 작고 예측 가능하다.
- 낮은 분해능: PPS 인터럽트에서 마이크로 초 단위 시간을 0으로 설정하면, PPS 자체의 오차(수 나노 초 단위)와 인터럽트 처리 루틴의 지연(수~수십 나노 초 단위)을 고려하더라도 마이크로 초 단위의 시간을 동기화할 수 있다. 보다 높은 정확성을 위해서 0 마이크로 초 대신에 PPS 오차와 측정된 인터럽트 처리 루틴 지연을 적용한 나노 초 단위 값을 설정할 수 있다.
위와 같은 방법을 통해 전송 지연, 처리 지연, 낮은 분해능 문제점을 해결할 수 있으며, GPS 타이밍 오차는 다음과 같이 해결된다.
시간 동기 모듈(130)은 GPS 모듈(110)이 획득한 UTC 시간을 언제 출력하는지 알 수 없다. 또한 UTC 시간이 특정 타이밍에 출력되는 경우, 도 2에 도시된 바와 같이 정상 동작할 수 있지만, 도 3에 도시된 바와 같이 UTC 시간이 1초 단위로 틀어지는 현상이 발생할 수 있다.
즉, GPS 모듈(110)이 UTC 시간 값을 획득한 후 이를 출력하는 도중에 UTC 초가 변경되면(비정상 동작 타이밍), 시간 동기 모듈(130)이 UTC 시간 값을 획득한 시점에는 '현재 UTC - 1'의 초 값을 가지게 된다.
이를 위해, 도 4에 도시된 시간 동기 방법을 제시한다. 도 4는 본 발명의 일 실시예에 따른 시간 동기 방법의 설명에 제공되는 흐름도이다.
도 4에 도시된 바와 같이, 먼저 시간 동기 모듈(130)은 PPS 발생 시마다, 현재의 시스템 시간 기준으로 "PPS 발생 시각"을 내부 변수(=utcTime)에 저장한다(S210).
그리고, GPS 모듈(110)로부터 UTC 시간 값이 포함된 NMEA 메시지를 수신하면(S220), 시간 동기 모듈(130)은 "UTC 시간 값이 포함된 NMEA 메시지를 수신 완료한 순간의 시스템 시각(Tcurrent)"과 내부 변수(=utcTime)에 저장해 둔 "PPS 발생 시각(Tpps)" 차이를 계산한다(S230).
시간 차이를 계산하는 것은 다음과 같은 타이밍 오차(Tdiff)를 방지하기 위한 것이다.
Tdiff = Dmsg + Dgps
- Dmsg: NMEA 메시지가 GPS 모듈(110)로부터 시간 동기 모듈(130)까지 전달되는 데 소요되는 전송 지연
- Dgps: GPS 모듈(110) 내부에서 발생하는 실제 시각과 메시지에 수납되는 시각의 차이
(Tcurrent - Tpps) ≤ Tdiff 이면(S240-N), 시간 동기 모듈(130)은 해당 NMEA 메시지를 무시한다(S260). 즉, 계산된 시간 차이가 타이밍 오차가 발생할 만큼 짧은 경우, 해당 NMEA 메시지 내의 UTC 시간을 무시하는 것이다.
예를 들어, GPS 모듈(110)로부터 시리얼 포트를 통해 NMEA 메시지를 수신하며, baudrate가 9,600인 경우(가장 느린 속도), 약 30바이트 길이의 라인(대략적인 NMEA 라인 길이)을 수신한다고 가정하면, 전송 지연은 약 25msec 정도가 된다.
이는, 시간 값이 전달되는 25msec + Dgps 사이에 PPS 인터럽트가 발생하면, 도 3에 도시된 비정상 동작 타이밍에 해당되게 된다. 따라서, 시간 동기 모듈(130)은 (Tcurrent - Tpps)가 (25msec(=Dmsg) + Dgps)보다 작으면 해당 메시지를 무시한다. 즉, 내부 변수인 utcTime을 업데이트 하지 않는다.
한편, baudrate가 115,200인 경우 전송 지연은 약 2msec 정도가 되므로, CPU(120)는 시리얼 포트의 baudrate를 기반으로 Dmsg를 다르게 계산할 수도 있다. Dgps는 제품의 데이터시트를 통해 확인 또는 추측할 수 있다. 예를 들어, 제품에 따라 5msec가 될 수도 있다.
UTC 시간 값을 포함하는 NMEA 메시지는 최소 xxZDA, xxRMC, xxGLL, xxGGA 4가지이므로, 적어도 하나의 메시지는 PPS 발생시점으로부터 25msec 이후의 시점에 수신된다.
반면, (Tcurrent - Tpps) > Tdiff 이면(S240-Y), 시간 동기 모듈(130)은 해당 NMEA 메시지를 사용하여, 시스템 시각을 설정한다(S250). 즉, 계산된 시간 차이가 타이밍 오차가 발생할 정도의 구간 보다 길면, 해당 NMEA 메시지 내의 UTC 시간을 사용하는 것이다.
구체적으로 S250단계에서는, 시간 동기 모듈(130)이 NMEA 메시지에서 UTC 시간 값을 추출하여 내부 변수(utcTime)에 해당 시각을 저장하고, 다음 번 PPS 인터럽트 처리 루틴에서 utcTime + 1초 값을 시스템 시각으로 설정한다.
도 5에는, 도 4에 도시된 시간 동기 방법에서 '(Tcurrent - Tpps) ≤ Tdiff'인 경우와 '(Tcurrent - Tpps) > Tdiff'인 경우의 처리 과정을 구체적으로 예시하였다.
도 4에 제시된 본 발명의 실시예에 따른 시간 동기 방법은 다음과 같은 비정상 동작이 발생할 수 있다.
1) 시간 동기 모듈(130)이 NMEA 메시지 수신 시에 수행하는 "저장된 이전 PPS 발생 시각 확인" 절차와 "내부 변수(=utcTime) 저장" 절차는 완벽히 원자적인 동작으로 묶여 있지 않으며, 따라서 도 6에 도시된 바와 같이, 두 절차 간의 사이에 PPS가 발생하게 되면 타이밍이 틀어질 여지가 있다.
2) 도 7에 도시된 바와 같이, PPS 신호 수신(PPS 인터럽트)과 NMEA 메시지 획득 절차가 누락되면 타이밍이 틀어질 수 있다.
이를 위해, 본 발명의 다른 실시예에서는, 위 "1)"에 의한 비정상 동작을 해소하기 위한 방안을 제시한다. 본 발명의 다른 실시예에 따른 시간 동기 방법은, 도 4에 도시된 S220단계와 S230단계 사이에, 도 8에 도시된 절차를 추가한다.
구체적으로, 도 8에 도시된 바와 같이, GPS 모듈(110)로부터 UTC 시간 값이 포함된 NMEA 메시지를 수신하면(S220), 시간 동기 모듈(130)은 "수신한 순간의 시스템 시각"과 기존에 저장해 둔 "PPS 발생 시각" 차이를 계산한다(S222).
S222단계에서 계산된 시간 차이가 타이밍 오차가 발생할 만큼 짧은 경우(S224-Y), S260단계가 수행되어 NMEA 메시지를 무시한다.
시간 차이가 타이밍 오차가 발생할 만큼 짧은 경우는, 이를 테면, NMEA 메시지 수신 시각이 기저장된 "PPS 발생 시각"으로부터 990msec(=0.99sec)가 경과하고 1sec가 경과하기 전의 시구간에 포함된 경우로 설정할 수 있다.
즉, 시간 차이가 1초에 많이 가까우면, PPS 타이밍이 겹칠 확률이 높기 때문에, 이를 피하기 위해 수신된 NMEA 메시지를 무시하는 것이다.
"990msec = 1sec - 10msec"의 관계로 결정된 것인데, "10msec"는 지터 등을 고려하여 다른 값으로 대체할 수 있다.
도 4의 S240단계에 의해 (Tcurrent - Tpps) ≤ Tdiff 인 경우에도 NMEA 메시지가 무시되므로, 본 발명의 실시예에 따르면 "PPS 발생 시각"으로부터 9990msec가 경과하고 "Tcurrent"로부터 Tdiff sec가 경과하기 전에 수신된 NMEA 메시지는 무시된다.
한편, S222단계에서 계산된 시간 차이가 타이밍 오차가 발생할 만큼 짧지 않은 경우(S224-N), S230단계가 수행된다. 이를 테면, NMEA 메시지 수신 시각이 기저장된 "PPS 발생 시각"으로부터 990msec가 경과하고 1sec가 경과하기 전의 시구간에 포함되지 않은 경우이다.
도 9에는, 본 발명의 다른 실시예에 따른 시간 동기 방법에 따른 처리 과정을 구체적으로 예시하였다.
본 발명의 또 다른 실시예에서는, 위 "2)"에 의한 비정상 동작을 해소하기 위한 방안을 제시한다. 본 발명의 또 다른 실시예에 따른 시간 동기 방법은, 도 4에 도시된 S240단계와 S250단계 사이에, 도 10에 도시된 절차를 추가한다.
구체적으로, 도 10에 도시된 바와 같이, 시간 동기 모듈(130)은 시스템 시각 설정 전에 "현재 시각"과 "이전 PPS발생 시각"의 차이를 산출한다(S242).
이때, 산출된 시간 차이가 1초를 훨씬 초과(이를 테면, 1.5초를 초과)하면(S244-N), PPS 인터럽트가 누락되었다고 판단하여, S260단계를 수행하며, 이에 의해 NMEA 메시지가 무시된다.
반면, 산출된 시간 차이가 1.5초 이하이면(S244-Y), PPS 인터럽트를 정상으로 판단하여, S250단계를 수행하며, 이에 의해 시스템 시각이 설정된다.
도 11에는, 본 발명의 또 다른 실시예에 따른 시간 동기 방법에 따른 처리 과정을 구체적으로 예시하였다.
위와 같은 방법을 통해 GPS 모듈(110)이 장착된 시스템은 시스템 시계를 UTC 시간에 나노~마이크로 초 단위로 동기화할 수 있다.
지금까지, GPS를 이용하는 장치의 UTC 시간 동기 방법에 대해 바람직한 실시예를 들어 상세히 설명하였다.
본 발명의 실시예에서는, GPS 모듈(110)이 장착된 시스템에서 시스템 시계를 UTC 시간에 나노~마이크로 초 단위로 동기화하는 기법을 제시하였다.
이 기법은 GPS 모듈을 이용하는 시스템이라면 제한 없이 적용 가능하다. GPS를 이용하는 WAVE 차량용 단말은 물론, 그 밖의 다른 시스템에도 본 발명의 기술적 사상이 적용될 수 있다.
한편, 본 실시예에 따른 장치와 방법의 기능을 수행하게 하는 컴퓨터 프로그램을 수록한 컴퓨터로 읽을 수 있는 기록매체에도 본 발명의 기술적 사상이 적용될 수 있음은 물론이다. 또한, 본 발명의 다양한 실시예에 따른 기술적 사상은 컴퓨터로 읽을 수 있는 기록매체에 기록된 컴퓨터로 읽을 수 있는 코드 형태로 구현될 수도 있다. 컴퓨터로 읽을 수 있는 기록매체는 컴퓨터에 의해 읽을 수 있고 데이터를 저장할 수 있는 어떤 데이터 저장 장치이더라도 가능하다. 예를 들어, 컴퓨터로 읽을 수 있는 기록매체는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광디스크, 하드 디스크 드라이브, 등이 될 수 있음은 물론이다. 또한, 컴퓨터로 읽을 수 있는 기록매체에 저장된 컴퓨터로 읽을 수 있는 코드 또는 프로그램은 컴퓨터간에 연결된 네트워크를 통해 전송될 수도 있다.
또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.
Claims (8)
- 프로세서가, 제1 신호를 이용하여 시스템 시간의 초 단위 시간 값을 설정하는 제1 설정 단계; 및제1 신호의 수신 시각과 제2 신호의 발생 시각이 특정 조건을 만족하면, 프로세서가 제2 신호를 이용하여 시스템 시간의 초 단위 이하의 시간 값을 설정하는 제2 설정 단계;를 포함하는 것을 특징으로 하는 시간 동기 방법.
- 청구항 1에 있어서,제2 설정 단계는,제1 신호의 수신 시각과 제2 신호의 발생 시각의 차이가 제1 시간 이하이면, 프로세서가 제2 신호를 이용하여 시스템 시간의 초 단위 이하의 시간 값을 설정하는 것을 특징으로 하는 시간 동기 방법.
- 청구항 1에 있어서,제2 설정 단계는,시스템 시간과 제2 신호의 발생 시각의 차이가 제2 시간 이하이면, 프로세서가 제2 신호를 이용하여 시스템 시간의 초 단위 이하의 시간 값을 설정하는 것을 특징으로 하는 시간 동기 방법.
- 청구항 1에 있어서,제2 신호는, 인터럽트 신호이고,제2 설정 단계는, 인터럽트 처리 루틴에서 수행되는 것을 특징으로 하는 시간 동기 방법.
- 청구항 4에 있어서,제1 신호는, GPS 모듈로부터 수신되는 NMEA 메시지이고,제2 신호는, GPS 모듈로부터 수신되는 PPS 신호인 것을 특징으로 하는 시간 동기 방법.
- 청구항 1에 있어서,제2 설정 단계는,제2 신호 발생 시간을 저장하는 단계;를 더 포함하고,제1 설정 단계는,제1 신호가 수신된 시스템 시간과 저장된 제2 신호 발생 시간의 차가 기준 값 보다 크면, 제1 신호를 이용하여 시스템 시간의 초 단위 시간 값을 설정하는 것을 특징으로 하는 시간 동기 방법.
- 청구항 6에 있어서,제1 설정 단계는,제1 신호로부터 추출한 초 단위 시간 값을 내부 변수에 저장하는 단계;제2 신호가 수신되면, 내부 변수에 저장된 초 단위 시간 값 + 1을 시스템 시간의 초 단위 시간 값으로 설정하는 단계;를 포함하는 것을 특징으로 하는 시간 동기 방법.
- 시간 정보를 포함하고 있는 제1 신호와 제2 신호를 발생시키는 모듈; 및모듈로부터 수신한 제1 신호를 이용하여 시스템 시간의 초 단위 시간 값을 설정하고, 제1 신호의 수신 시각과 제2 신호의 발생 시각이 특정 조건을 만족하면 모듈로부터 수신한 제2 신호를 이용하여 시스템 시간의 초 단위 이하의 시간 값을 설정하는 프로세서;를 포함하는 것을 특징으로 하는 시스템.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2016-0151629 | 2016-11-15 | ||
| KR1020160151629A KR101967027B1 (ko) | 2016-11-15 | 2016-11-15 | 비정상 동작 상황을 개선한 gps를 이용하는 장치의 utc 시간 동기 방법 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018093046A1 true WO2018093046A1 (ko) | 2018-05-24 |
Family
ID=62145615
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2017/011249 Ceased WO2018093046A1 (ko) | 2016-11-15 | 2017-10-12 | 비정상 동작 상황을 개선한 gps를 이용하는 장치의 utc 시간 동기 방법 |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR101967027B1 (ko) |
| WO (1) | WO2018093046A1 (ko) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106814601A (zh) * | 2017-03-24 | 2017-06-09 | 厦门九华通信设备厂 | 一种特定信号的随机噪声滤波方法 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112068165B (zh) * | 2020-09-04 | 2023-01-17 | 北京航空航天大学 | 一种高精度时间性能间接检测方法 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20020012538A (ko) * | 1999-02-26 | 2002-02-16 | 파리스,사덱,엠 | 글로벌 시간 동기화된 시스템, 장치, 및 방법 |
| KR20050108812A (ko) * | 2004-05-13 | 2005-11-17 | 주식회사 이노와이어리스 | 시간정보 제공장치 및 방법 |
| KR20100045818A (ko) * | 2008-10-24 | 2010-05-04 | 한국표준과학연구원 | Gps 시간 동기화 시스템 및 이를 이용한 시간 동기화 방법 |
| KR20110017929A (ko) * | 2008-06-23 | 2011-02-22 | 닛본 덴끼 가부시끼가이샤 | 시각 동기 장치 |
| KR20130113247A (ko) * | 2012-04-05 | 2013-10-15 | (주) 시스메이트 | 안정적인 utc 시간 데이터 생성 장치 및 방법 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4468089B2 (ja) * | 2004-06-29 | 2010-05-26 | セイコープレシジョン株式会社 | 時刻データ取得装置、コンピュータプログラム及びサーバ |
| JP2011122983A (ja) * | 2009-12-11 | 2011-06-23 | Toshiba Corp | 時刻同期装置およびその時刻同期補正方法 |
| KR20130134458A (ko) * | 2012-05-31 | 2013-12-10 | 주식회사 디에스텍 | 계측 시간 동기를 위한 장치 및 이를 위한 방법 |
-
2016
- 2016-11-15 KR KR1020160151629A patent/KR101967027B1/ko active Active
-
2017
- 2017-10-12 WO PCT/KR2017/011249 patent/WO2018093046A1/ko not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20020012538A (ko) * | 1999-02-26 | 2002-02-16 | 파리스,사덱,엠 | 글로벌 시간 동기화된 시스템, 장치, 및 방법 |
| KR20050108812A (ko) * | 2004-05-13 | 2005-11-17 | 주식회사 이노와이어리스 | 시간정보 제공장치 및 방법 |
| KR20110017929A (ko) * | 2008-06-23 | 2011-02-22 | 닛본 덴끼 가부시끼가이샤 | 시각 동기 장치 |
| KR20100045818A (ko) * | 2008-10-24 | 2010-05-04 | 한국표준과학연구원 | Gps 시간 동기화 시스템 및 이를 이용한 시간 동기화 방법 |
| KR20130113247A (ko) * | 2012-04-05 | 2013-10-15 | (주) 시스메이트 | 안정적인 utc 시간 데이터 생성 장치 및 방법 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106814601A (zh) * | 2017-03-24 | 2017-06-09 | 厦门九华通信设备厂 | 一种特定信号的随机噪声滤波方法 |
| CN106814601B (zh) * | 2017-03-24 | 2019-06-04 | 厦门九华通信设备厂 | 一种特定信号的随机噪声滤波方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| KR20180054103A (ko) | 2018-05-24 |
| KR101967027B1 (ko) | 2019-04-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110329273B (zh) | 一种用于无人驾驶获取数据同步的方法及装置 | |
| US8325767B2 (en) | Enhancement of IEEE 1588 synchronization using out-of-band communication path | |
| CN108650051B (zh) | 通用全硬件一步式1588的时钟同步装置及方法 | |
| US8738792B2 (en) | Server time protocol messages and methods | |
| WO2012105758A2 (en) | Apparatus and method for generating gps time | |
| US6981063B1 (en) | Method for time synchronization of a computer network, and computer network with time synchronization | |
| CN109683567A (zh) | 基于rs485网络中系统时钟同步方法 | |
| WO2020185008A1 (ko) | 위성 항법 시스템 기반의 시각 동기 장치 및 방법 | |
| WO2012119385A1 (zh) | 对pcie设备进行时间同步的方法、装置和系统 | |
| CN107786293A (zh) | 时间同步方法、主时钟设备、从时钟设备及时间同步系统 | |
| WO2018093046A1 (ko) | 비정상 동작 상황을 개선한 gps를 이용하는 장치의 utc 시간 동기 방법 | |
| CN117879747A (zh) | 报文时间戳的获取方法、装置、设备及存储介质 | |
| US20140145875A1 (en) | Satellite receiver module for telecommunication equipment | |
| KR20170124213A (ko) | Gps를 이용하는 장치의 utc 시간 동기 방법 | |
| CN101228724A (zh) | 串行通信中的时间同步 | |
| WO2013154284A1 (ko) | 분산 제어 시스템의 시간 동기화 장치 및 방법 | |
| CN113419598B (zh) | 一种多soc系统时钟同步系统及方法 | |
| CN105334727A (zh) | 基于多测量点的同步方法和装置 | |
| CA2581524A1 (en) | Data processing apparatus | |
| WO2019059475A1 (ko) | 오디오장치 및 그 오디오장치의 제어방법 | |
| WO2016000324A1 (zh) | 时间同步的实现方法及装置 | |
| WO2013154283A1 (ko) | 분산 제어 시스템에서 태스크 동기화 장치 및 방법 | |
| KR100321003B1 (ko) | 디지털 트렁크를 이용한 시각 동기 신호 분배장치 | |
| CN212623646U (zh) | 一种PXIe-FC仿真卡 | |
| WO2024080571A1 (ko) | 클럭 위상 캘리브레이션 장치 및 방법 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17871834 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17871834 Country of ref document: EP Kind code of ref document: A1 |