Method for realizing millisecond timing by using GPS second pulse synchronization system time

文档序号:828441 发布日期:2021-03-30 浏览:39次 中文

阅读说明:本技术 一种利用gps秒脉冲同步系统时间实现毫秒计时的方法 (Method for realizing millisecond timing by using GPS second pulse synchronization system time ) 是由 吴晶晶 芮功兵 秦兆均 于 2020-12-04 设计创作,主要内容包括:本发明在国内首次提出了一种利用GPS秒脉冲同步系统时间实现毫秒计时的方法,首次在水面舰声纳系统显控台中实现。计算机系统时间一般由硬件计时芯片实现,计算机系统时间的守时精度主要处决于计时芯片的晶体振荡器精度。在没有外部校时的情况下,较长一段时间后,计算机系统时间总会出现累计偏差。另外,计算机系统时间也不提供毫秒计时功能,而通过软件实现的毫秒计数误差较大,无法应用于精确定时系统。本方法将GPS秒脉冲作为外部同步信号,配合GPS授时实现计算机系统时间同步及毫秒精确计时功能。本发明在嵌入式计算机实时控制系统有较好的应用前景。(The invention provides a method for realizing millisecond timing by using GPS second pulse synchronization system time for the first time in China, and the method is realized in a display and control console of a surface ship sonar system for the first time. The computer system time is generally realized by a hardware timing chip, and the time keeping precision of the computer system time is mainly determined by the precision of a crystal oscillator of the timing chip. In the case of no external timing, the computer system always has accumulated deviation after a long period of time. In addition, the computer system time does not provide the millisecond timing function, and the millisecond counting error realized by software is large, so that the method cannot be applied to a precise timing system. The method takes GPS second pulse as an external synchronizing signal and realizes the functions of time synchronization and millisecond accurate timing of a computer system by matching with GPS time service. The invention has better application prospect in the embedded computer real-time control system.)

1. A method for realizing millisecond timing by using GPS second pulse synchronous system time is characterized in that: the method comprises the following steps:

(1) receiving a time code of a GPS through a standard interface, and synchronously presetting year, month, day, hour, minute and second input registers of a value system under the control of a write control signal;

(2) a GPS second pulse signal is accessed through a standard interface and is used as a zero clearing signal of the millisecond timer to control the counting of the millisecond counter to return to zero;

(3) tracking and frequency locking are carried out on oscillation signals output by the high-precision constant-temperature crystal oscillator, and then a high-stability millisecond clock is output by counting frequency division; the millisecond clock is used as an input signal of a millisecond counter to realize millisecond counting;

(4) the millisecond counting carry signal drives a second counter to realize second counting;

(5) the second counting carry signal drives a sub-counter to realize sub-counting;

(6) a time counter driven by the count carry signal to count in real time;

(7) the time counting carry signal drives a day counter to count the day under the judgment of leap year and big and small month;

(8) the month counter is driven by the day counting carry signal, and month counting is realized under the judgment of leap years;

(9) the carry signal drives the year counter during the month counting to realize the year counting;

(10) synchronously reading the year, month, day, hour, minute, second and millisecond values in the output register through a standard interface under the control of a read control signal; as system time.

2. The method of claim 1 for synchronizing system time with GPS seconds to achieve millisecond timing, wherein: and (3) implementing logic of controlled counting of the year, month, day, time, minute, second and millisecond counters in the steps (2) to (9).

Technical Field

The invention relates to the field of computer peripheral interface application, in particular to a method for realizing millisecond timing by using GPS second pulse synchronization system time.

Background

In the sonar system, the target is calibrated accurately in time, and the target position prediction and tracking during weapon striking are facilitated. Therefore, synchronization of sonar system time with external system (e.g., weapon system) time is very important. The time synchronization of two or more systems can be realized by adopting GPS time service. The sonar system adopts GPS time code to synchronize system time, utilizes the pulse per second signal to realize accurate millisecond timing, is convenient for carrying out accurate time calibration on sonar targets, and is beneficial to accurately striking the targets by a weapon system.

Disclosure of Invention

The invention aims to overcome the defects in the prior art and provides a method for realizing millisecond timing by using GPS second pulse synchronous system time. The GPS time code is used for presetting system time (year, month, day, hour, minute and second), the GPS second pulse signal is used for controlling millisecond counting, the synchronization of the system time and the GPS is realized, and the system time and the GPS have a millisecond accurate timing function.

The object of the present invention is achieved by the following technical means. A method for realizing millisecond timing by using GPS second pulse synchronization system time is a new method for synchronizing computer system time in an embedded real-time control system, and meets the requirement of carrying out accurate time calibration on a target in a sonar system.

The method comprises the following steps:

(1) receiving a time code of a GPS through a standard interface, and synchronously presetting year, month, day, hour, minute and second input registers of the system under the control of a write control signal;

(2) a GPS second pulse signal is accessed through a standard interface and is used as a zero clearing signal of the millisecond timer to control the counting of the millisecond counter to return to zero;

(3) tracking and frequency locking are carried out on oscillation signals output by the high-precision constant-temperature crystal oscillator, and then a high-stability millisecond clock is output by counting frequency division; the millisecond clock is used as an input signal of a millisecond counter to realize millisecond counting;

(4) the millisecond counting carry signal drives a second counter to realize second counting;

(5) the second counting carry signal drives a sub-counter to realize sub-counting;

(6) a time counter driven by the count carry signal to count in real time;

(7) the time counting carry signal drives a day counter to count the day under the judgment of leap year and big and small month;

(8) the month counter is driven by the day counting carry signal, and month counting is realized under the judgment of leap years;

(9) the carry signal drives the year counter during the month counting to realize the year counting;

(10) synchronously reading the year, month, day, hour, minute, second and millisecond values in the output register through a standard interface under the control of a read control signal; as system time.

And (3) implementing logic of controlled counting of the year, month, day, time, minute, second and millisecond counters in the steps (2) to (9).

The invention has the beneficial effects that:

(1) the method can realize the time synchronization of two or more systems and realize the time unification;

(2) the method can make the computer have the function of millisecond accurate timing.

Drawings

Fig. 1 is a schematic diagram of the present invention.

FIG. 2 is a schematic process flow diagram of the present invention.

Detailed Description

The invention will be described in detail below with reference to the following drawings:

the invention is illustrated by the following example, which can be generalized to nanosecond timing.

(1) Receiving GPS time code information through a standard interface (such as RS232, Ethernet and the like), and synchronously presetting a year, month, day, hour, minute and second input register of the system under the control of a write control signal;

(2) the GPS second pulse signal is accessed through a digital IO interface and is used as a zero clearing signal of the millisecond timer after being shaped, and the counting of the millisecond counter is controlled to be zero

(3) Tracking and frequency locking are carried out on the output signal of the crystal oscillator, and then a millisecond clock is output by counting and frequency division; the millisecond clock is used as an input signal of a millisecond counter to realize millisecond counting;

(4) the millisecond counting carry signal drives the second counting; the second counting carry signal drives the sub-counting; counting when the counting carry signal is driven; the time counting carry signal drives a day counter to count the day under the judgment of leap year and big and small month; the month counter is driven by the day counting carry signal, and month counting is realized under the judgment of leap years; carrying signals drive year counting when the month is counted;

(5) through standard interfaces (such as PCI, PCIE and other bus interfaces), under the control of the read control signal, the year, month, day, hour, minute, second and millisecond values in the output register are synchronously read out and used as the system time.

The invention provides a method for realizing millisecond timing by using GPS second pulse synchronization system time for the first time in China, and the method is realized in a display and control console of a surface ship sonar system for the first time. The computer system time is generally realized by a hardware timing chip, and the time keeping precision of the computer system time is mainly determined by the precision of a crystal oscillator of the timing chip. In the case of no external timing, the computer system always has accumulated deviation after a long period of time. In addition, the computer system time does not provide the millisecond timing function, and the millisecond counting error realized by software is large, so that the method cannot be applied to a precise timing system. The method takes GPS second pulse as an external synchronizing signal and realizes the functions of time synchronization and millisecond accurate timing of a computer system by matching with GPS time service. The invention has better application prospect in the embedded computer real-time control system.

It should be understood that equivalent substitutions and changes to the technical solution and the inventive concept of the present invention should be made by those skilled in the art to the protection scope of the appended claims.

5页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:腾空时间

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类