CN108628156A - A kind of high precision computation machine serial ports time service method - Google Patents

A kind of high precision computation machine serial ports time service method Download PDF

Info

Publication number
CN108628156A
CN108628156A CN201810212189.9A CN201810212189A CN108628156A CN 108628156 A CN108628156 A CN 108628156A CN 201810212189 A CN201810212189 A CN 201810212189A CN 108628156 A CN108628156 A CN 108628156A
Authority
CN
China
Prior art keywords
time
data
fpga
serial ports
computer
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.)
Pending
Application number
CN201810212189.9A
Other languages
Chinese (zh)
Inventor
江良剑
黄河
焦海松
黄旭东
刘军
任典元
李锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
63895 Troops Of Pla
Original Assignee
63895 Troops Of Pla
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 63895 Troops Of Pla filed Critical 63895 Troops Of Pla
Priority to CN201810212189.9A priority Critical patent/CN108628156A/en
Publication of CN108628156A publication Critical patent/CN108628156A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/02Setting 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
    • G04R20/04Tuning or receiving; Circuits therefor

Abstract

A kind of high precision computation machine serial ports time service method based on FPGA and GNSS terminal of the present invention, it is controlled using FPGA, realize multiple function module concurrent workings, can time data delay be exported to accurately calculate, reduce the generation of error, pin resource abundant FPGA, the independent time data output of multichannel can be achieved, it is multiple stage computers time service simultaneously, improve system availability and working efficiency, the system has higher time service precision, provides time label for the data of computer acquisition, is synchronized suitable for data and require high occasion.

Description

A kind of high precision computation machine serial ports time service method
Technical field:
The present invention relates to computer application field, specially a kind of high precision computation machine serial ports based on FPGA and GNSS terminal is awarded Shi Fangfa.
Background technology:
In the computer application field high to time required precision, it is difficult to meet by the punctual precision of the clock of computer itself and wants It asks, it is its time service to need external equipment.High-precision can be obtained by ntp server by connecting the computer of LAN or wide area network Time, NTP time service precisions are up to 10 milliseconds.However in the case of the computer that some application scenarios do not have access network, Such as field or confidentiality reasons, it is necessary to provide time base source by other approach for it.
In precision time service field, obtained because of the available split-second precision information of global navigational satellite positioning system extensively Using.It uses GNSS terminal for computer system time service, needs to solve the delay time that computer system gets temporal information. In addition, though GNSS terminal can provide very accurate time signal, but since computer operating system has non real-time more The characteristic of business is influenced by computer operating system operation load, and computer receives temporal information and carries out unpacking conversion, then arrives The process that time adjustment finishes is a unstable delay.The two delays are only resolved, just computer time service can be made to reach To the precision of optimization.
And existing time service method is by the data of the Big Dipper/GPS module output($GPRMC)It is straight to turn serial mode by USB It picks to computer, is carried out the resolving time by computer, computer time service is carried out after obtaining time-division second data.This method is not used PPS signal to the Big Dipper/GPS module is modified the time, and error is very big;Also it does not mention and resolves the date and to meter The date of calculation machine is modified, and date calibration can not be carried out when computer DATE ERROR.
Another method is with computer system communicate for 2 times by embedded system, since timer " is capturing Opened immediately after PPS signal ", " after embedded system receives ack signal, the current count value of recording timer and pass Close ", therefore the delay that communication obtains for the first time includes not only " estimating the time delay and meter of embedded system and computer communication process Time delay caused by the non real-time nature of calculation machine operating system " further includes starting 1 He of output time interval of delta t to information at the 1PPS moment Interval of delta t 2 between UTC time is received and calculates, second of communication doubles the decay time that the first step obtains, whole with UTC Several seconds sends jointly to computer and carries out time service.There are the error components of two influence time precision for this method:First, for the first time Computer system feeds back to one ack signal of embedded system when communication, and is communicated for the second time there is no the signals transmission, Communication mode in the method, will generate several milliseconds of time error, this method relative to introduce again Δ t1+ Δs t2 when Between error, general a few tens of milliseconds is to more than 100 milliseconds.
Invention content:
Above-mentioned in order to overcome the shortcomings of, the present invention provides a kind of high precision computation machine serial ports based on FPGA and GNSS terminal to award Shi Fangfa.
The technical solution adopted by the present invention to solve the technical problems:
A kind of high precision computation machine serial ports time service method, includes the following steps:
1)Serial communication modular is write by hardware description language, so that FPGA is realized serial data receive capabilities, can receive simultaneously Read the information of GNSS navigation modules output;
2)Year, month, day, hour, min, second data are extracted from the information of the GNSS navigation modules received, while extracting positioning mark Will;
3)When detecting that witness marker is effective, synchronous head, year, month, day, hour, min, second data and end mark are formed into a frame Data are sent when next 1PPS being waited for arrive;
4)FPGA connects the 1PPS signal output ends of GNSS navigation terminal modules by a pin, passes through rising edge detection module When capturing 1PPS signal rising edges, the 3rd ready data of step are sent to computer by serial communication modular;
5)After computer software has received a frame full time data, time t is calculatedn, baud rate is fixed when due to transmission, because The delay of this one frame data of transmission can calculate determination, and be set as δt1, the time t that data are sent can be extrapolated in this wayn =tn+1+δt1, it is easy to calculate time tn
6)Since computer operating system belongs to non real-time multiple task operating system, it is slow that computer runs time service software reading serial ports Rush area, time data resolving processing has delay, it is assumed that computer system time error is δt0, read the delay of serial ports buffering area For δt2, processing data delay is δt3, influenced by the load of operation process, δt2And δt3It is dynamic change;
7)To composition error δt0t2t3It is estimated:
7.1)Software first receives tnAnd calculate time tn , the adjustment of primary system time is carried out, keeps computer time substantially accurate;
7.2)Computer software is opened serial data and is received, and the time data of FPGA outputs is waited for;
7.3)The time data that a frame FPGA transmission comes has been received, system time t at this time is recordeds1
7.4)Calculate time tn, and calculate tn = tn+1+δt1, record system time t at this times2
7.5)Then ts1- tn t0t2, ts2-ts1t3, then ts2-tn t0t2t3
8)Step 7.3 is repeated to 7.5, multiple composition errors can be obtained, calculate its average value, go to correct as time complexity curve amount tn , revised time data modifies to system time, and more accurate system time can be obtained.
The GNSS navigation modules can support BD2 B1, GPS simultaneously using the UM220 Big Dippeves/GPS dual-mode chip L1 two frequency bins, can by setting make selection dual system work at the same time or single system work, 1PPS precision be 20ns.
The FPGA is carried out data transmission with computer by RS232 interface.
The FPGA can be communicated with several computers simultaneously, be its time service.
Due to using technical solution as described above, the present invention that there is following superiority:
A kind of high precision computation machine serial ports time service method of the present invention, is controlled using FPGA, realizes multiple function moulds Time data can be exported delay and accurately calculated, be reduced and missed by block concurrent working by hardware system and mating computer software The generation of difference, pin resource abundant FPGA is, it can be achieved that the independent time data of multichannel exports, while being awarded for multiple stage computers When, system availability and working efficiency are improved, which has higher time service precision, when being provided for the data of computer acquisition Between mark, synchronized suitable for data and require high occasion.
Description of the drawings:
Fig. 1 is the schematic diagram that is delayed in existing method;
Fig. 2 is the flow diagram of the present invention;
Specific implementation mode:
The present invention can be explained in more detail by following example, the open purpose of the present invention is intended in the protection scope of the invention All changes and improvements, the invention is not limited in the following examples;
A kind of high precision computation machine serial ports time service method in conjunction with described in attached drawing, includes the following steps:
1)Serial communication modular is write by hardware description language, so that FPGA is realized serial data receive capabilities, can receive simultaneously Read the information of GNSS navigation modules output;
2)Year, month, day, hour, min, second data are extracted from the information of the GNSS navigation modules received, while extracting positioning mark Will;
3)When detecting that witness marker is effective, synchronous head, year, month, day, hour, min, second data and end mark are formed into a frame Data are sent when next 1PPS being waited for arrive;
It should be noted that " head " indicates the beginning of a frame data, data frame head is received, so that it may correctly to understand each byte Meaning.
4)FPGA connects the 1PPS signal output ends of GNSS navigation terminal modules by a pin, is detected by rising edge When module captures 1PPS signal rising edges, the 3rd ready data of step are sent to computer by serial communication modular;
It is emphasized that the navigation module that the present invention uses uses rising edge to indicate that 1PPS, some navigation modules are used Failing edge, the present invention equally can also be used failing edge to capture signal.
5)After computer software has received a frame full time data, time t is calculatedn, baud rate is solid when due to transmission It is fixed, therefore the delay for transmitting a frame data can calculate determination, and it is set as δt1, can extrapolate that data are sent in this way when Between tn =tn+1+δt1, it is easy to calculate time tn
It is emphasized that calculating tn =tn+1+δt1When, time here add 1 second be because FPGA receives temporal information after, It is just exported in next second 1PPS rising edge.
6)Since computer operating system belongs to non real-time multiple task operating system, computer runs time service software and reads string Mouth buffering area, time data resolving processing have delay, it is assumed that computer system time error is δt0, read serial ports buffering area Delay is δt2, processing data delay is δt3, influenced by the load of operation process, δt2And δt3It is dynamic change;
7)To composition error δt0t2t3It is estimated:
7.1)Software first receives tnAnd calculate time tn , the adjustment of primary system time is carried out, keeps computer time substantially accurate;
7.2)Computer software is opened serial data and is received, and the time data of FPGA outputs is waited for;
7.3)The time data that a frame FPGA transmission comes has been received, system time t at this time is recordeds1
7.4)Calculate time tn, and calculate tn = tn+1+δt1, record system time t at this times2
7.5)Then ts1- tn t0t2, ts2-ts1t3, then ts2-tn t0t2t3
8)Step 7.3 is repeated to 7.5, multiple composition errors can be obtained, calculate its average value, go to correct as time complexity curve amount tn , revised time data modifies to system time, and more accurate system time can be obtained.
The GNSS navigation modules can support BD2 B1, GPS simultaneously using the UM220 Big Dippeves/GPS dual-mode chip L1 two frequency bins, can by setting make selection dual system work at the same time or single system work, 1PPS precision be 20ns.
The FPGA is carried out data transmission with computer by RS232 interface.
The FPGA can be communicated with several computers simultaneously, be its time service.
With the development of FPGA technology, FPGA can not only solve the problems, such as miniaturization, low-power consumption, high reliability, also have Have the advantages that the speed of service is fast, pin is more, internal module is run parallel.The UM220 Big Dippeves that GNSS terminal uses and core star leads to/ GPS dual-mode chip can support BD2 B1, GPS L1 two frequency bins simultaneously, selection dual system can be made to work at the same time by setting Or single system work, 1PPS precision are 20ns.Pass through the time number in the standard RMC for calculating navigation module output of FPGA According to, and the PPS for snapping to next second is exported, and can eliminate uncertain Δ t1 in Fig. 1.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case of without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Profit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent requirements of the claims Variation is included within the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.
It is the prior art not state part in the above content carefully, therefore does not run business into particular one and state.

Claims (4)

1. a kind of high precision computation machine serial ports time service method, it is characterised in that:Include the following steps:
1)By to FPGA write-in programs, its serial ports is enable to receive and read GNSS navigation terminal modules output information;
2)Year, month, day, hour, min, second data are extracted from the information of the GNSS navigation terminal modules received, while being extracted and being determined Bit flag;
3)When detecting that witness marker is effective, synchronous head, year, month, day, hour, min, second data and end mark are formed into a frame Data are sent when 1PPS being waited for arrive;
4)FPGA connects the 1PPS signal output ends of GNSS navigation terminal modules by a pin, passes through rising edge detection module When capturing 1PPS signal rising edges, the 3rd ready data of step are sent to computer by serial ports;
5)After computer software has received a frame full time data, time t is calculatedn, baud rate is fixed when due to transmission, because The delay of this one frame data of transmission can calculate determination, and be set as δt1, the time t that data are sent can be extrapolated in this wayn =tn+1+δt1, it is easy to calculate time tn
6)Since computer operating system belongs to non real-time multiple task operating system, it is slow that computer runs time service software reading serial ports Rush area, time data resolving processing has delay, it is assumed that computer system time error is δt0, read the delay of serial ports buffering area For δt2, processing data delay is δt3, influenced by the load of operation process, δt2And δt3It is dynamic change;
7)To composition error δt0t2t3It is estimated:
7.1)Software first receives tnAnd calculate time tn , the adjustment of primary system time is carried out, keeps computer time substantially accurate;
7.2)Computer software is opened serial data and is received, and the time data of FPGA outputs is waited for;
7.3)The time data that a frame FPGA transmission comes has been received, system time t at this time is recordeds1
7.4)Calculate time tn, and calculate tn = tn+1+δt1, record system time t at this times2
7.5)Then ts1- tn t0t2, ts2-ts1t3, then ts2-tn t0t2t3
8)Step 7.3 is repeated to 7.5, multiple composition errors can be obtained, calculate its average value, go to correct as time complexity curve amount tn , revised time data modifies to system time, and more accurate system time can be obtained.
2. a kind of high precision computation machine serial ports time service method according to claim 1, it is characterised in that:The GNSS navigation Terminal module can support BD2 B1, GPS L1 two frequency bins, can lead to simultaneously using the UM220 Big Dippeves/GPS dual-mode chip Cross setting make selection dual system work at the same time or single system work, 1PPS precision be 20ns.
3. a kind of high precision computation machine serial ports time service method according to claim 1, it is characterised in that:The FPGA and meter Calculation machine is carried out data transmission by rs232 interfaces.
4. a kind of high precision computation machine serial ports time service method according to claim 1, it is characterised in that:The FPGA can It is communicated simultaneously with several computers, is its time service.
CN201810212189.9A 2018-03-15 2018-03-15 A kind of high precision computation machine serial ports time service method Pending CN108628156A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810212189.9A CN108628156A (en) 2018-03-15 2018-03-15 A kind of high precision computation machine serial ports time service method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810212189.9A CN108628156A (en) 2018-03-15 2018-03-15 A kind of high precision computation machine serial ports time service method

Publications (1)

Publication Number Publication Date
CN108628156A true CN108628156A (en) 2018-10-09

Family

ID=63706216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810212189.9A Pending CN108628156A (en) 2018-03-15 2018-03-15 A kind of high precision computation machine serial ports time service method

Country Status (1)

Country Link
CN (1) CN108628156A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970041A (en) * 2020-07-03 2020-11-20 南京天际砺剑科技有限公司 Beidou high-precision communication system based time synchronization technology research method
CN114647179A (en) * 2020-12-18 2022-06-21 华为技术有限公司 Master clock device, slave clock device and time synchronization method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043253A (en) * 2006-06-26 2007-09-26 华为技术有限公司 Process for obtaining high-precision time
CN103760763A (en) * 2013-12-27 2014-04-30 航天科工深圳(集团)有限公司 GPS clock synchronization system and method and distribution terminal unit
CN106292267A (en) * 2016-07-28 2017-01-04 武汉纳时科技有限公司 A kind of GNSS high accuracy time service terminal system and time service method
CN106774637A (en) * 2015-12-22 2017-05-31 中国电子科技集团公司第二十研究所 A kind of device and method when carrying out computer school using 1PPS signals
CN107229219A (en) * 2017-06-28 2017-10-03 山东超越数控电子有限公司 It is a kind of based on GPS module, the computer precision time service method of embedded system and its to realize system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043253A (en) * 2006-06-26 2007-09-26 华为技术有限公司 Process for obtaining high-precision time
CN103760763A (en) * 2013-12-27 2014-04-30 航天科工深圳(集团)有限公司 GPS clock synchronization system and method and distribution terminal unit
CN106774637A (en) * 2015-12-22 2017-05-31 中国电子科技集团公司第二十研究所 A kind of device and method when carrying out computer school using 1PPS signals
CN106292267A (en) * 2016-07-28 2017-01-04 武汉纳时科技有限公司 A kind of GNSS high accuracy time service terminal system and time service method
CN107229219A (en) * 2017-06-28 2017-10-03 山东超越数控电子有限公司 It is a kind of based on GPS module, the computer precision time service method of embedded system and its to realize system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970041A (en) * 2020-07-03 2020-11-20 南京天际砺剑科技有限公司 Beidou high-precision communication system based time synchronization technology research method
CN114647179A (en) * 2020-12-18 2022-06-21 华为技术有限公司 Master clock device, slave clock device and time synchronization method

Similar Documents

Publication Publication Date Title
CN100498232C (en) SDINS/GPS combined guidance system time synchronism and synchronous data extraction method
CN100461721C (en) System, method and apparatus for testing long-distance frame time delay
US20220124655A1 (en) Time synchronization method and electronic device
CN108023658B (en) High-precision clock synchronization time service method and device
WO2017219881A1 (en) Method and device for time synchronization based on 1588 standard
CN103401672A (en) Time synchronization device, equipment and system
CN106707736A (en) Automobile instrument clock precision measuring method and automobile instrument clock precision measuring device
CN106685566B (en) A kind of selection method and clock server of clock source
CN110928176B (en) Multifunctional time service equipment supporting multiple time service technologies
WO2021008532A1 (en) Active antenna unit delay alignment method and apparatus and active antenna unit
CN101043253A (en) Process for obtaining high-precision time
US20100293243A1 (en) method and apparatus for measuring directionally differentiated (one-way) network latency
CN108628156A (en) A kind of high precision computation machine serial ports time service method
CN102510327A (en) Method and device for improving synchronous precision of long-range two-way time comparison modulator-demodulator
CN113960413A (en) Time synchronization method for collecting unit and collecting unit in fault indicator
CN113419598B (en) Clock synchronization system and method for multi-SOC (system on chip)
JP5261714B2 (en) High-precision time synchronization apparatus, high-precision time synchronization method, and program
CN107800500A (en) A kind of method, apparatus and equipment for determining time synchronized message clock time
CN100334846C (en) High precision network delay measuring method based on universal PC
CN201556048U (en) Multifunctional time integrating measuring instrument
WO2023019984A1 (en) Clock synchronization method for control system, and control system
CN112654082B (en) Timing device, base station, positioning system, calibration method and positioning method
US11606156B1 (en) Clock synchronization
CN111190344B (en) Design method of satellite navigation military code time service equipment
CN109274366A (en) The clock test instrument and clock test methodology of distribution terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181009