Time synchronization method, data synchronization method, device, system, equipment and medium

文档序号:1543206 发布日期:2020-01-17 浏览:26次 中文

阅读说明:本技术 时间同步方法、数据同步方法、装置、系统、设备和介质 (Time synchronization method, data synchronization method, device, system, equipment and medium ) 是由 罗龙华 许全君 黄宗强 陈善美 于 2019-09-09 设计创作,主要内容包括:本申请涉及一种时间同步方法、数据同步方法、装置、系统、设备和介质。所述时间同步方法包括:启动数据源设备内部的计时器;所述计时器是按照浮动读数向目标读数按秒进位的方式进行计时的;若卫星接收设备发送至所述数据源设备的秒脉冲信号中断,则根据所述浮动读数更新所述目标读数;获取更新后的目标读数;将所述更新后的目标读数设为第一同步时间基准;所述第一同步时间基准,用于所述数据源设备根据所述第一同步时间基准发送测量数据包。采用本方法能够在卫星接收设备的秒脉冲信号输出异常的情况下,实现将数据源设备的时间基准和卫星接收设备的时间对齐。(The application relates to a time synchronization method, a data synchronization method, a device, a system, equipment and a medium. The time synchronization method comprises the following steps: starting a timer inside the data source equipment; the timer is used for timing to the target reading according to the second carry mode of the floating reading; if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted, updating the target reading according to the floating reading; acquiring an updated target reading; setting the updated target reading as a first synchronization time reference; and the first synchronous time reference is used for the data source equipment to send a measurement data packet according to the first synchronous time reference. By adopting the method, the time reference of the data source equipment and the time of the satellite receiving equipment can be aligned under the condition that the pulse per second signal output of the satellite receiving equipment is abnormal.)

1. A time synchronization method, characterized in that the time synchronization method comprises:

starting a timer inside the data source equipment; the timer is used for timing to the target reading according to the second carry mode of the floating reading;

if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted, updating the target reading according to the floating reading;

acquiring an updated target reading;

setting the updated target reading as a first synchronization time reference; and the first synchronous time reference is used for the data source equipment to send a measurement data packet according to the first synchronous time reference.

2. The method of time synchronization of claim 1, wherein the step of updating the target reading based on the floating reading comprises:

if the floating reading reaches a carry value, accumulating the target reading by using the carry value to obtain an updated target reading;

the floating readings that reached the carry value are cleared.

3. The time synchronization method according to claim 1 or 2, further comprising the steps of:

and if the pulse per second signal is not interrupted, updating the target reading according to the pulse per second signal, and clearing the floating reading.

4. The time synchronization method according to claim 1 or 2, further comprising the steps of:

acquiring a current environment temperature parameter;

acquiring a target compensation value corresponding to the current environment temperature parameter according to a corresponding relation between a preset environment temperature parameter and the compensation value;

and updating the target reading according to the target compensation value.

5. The time synchronization method according to claim 4, wherein before the step of obtaining the target compensation value corresponding to the current ambient temperature parameter according to the corresponding relationship between the preset ambient temperature parameter and the compensation value, the method further comprises the steps of:

testing a precision error between the float reading and the pulse per second signal based on different ambient temperature parameters;

and setting the precision error corresponding to each environment temperature parameter as a compensation value corresponding to each environment temperature parameter.

6. The method for time synchronization of claim 1 or 2, further comprising, after the step of setting the updated target reading to a first synchronization time reference:

if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is recovered, updating the updated target reading based on the pulse per second signal;

setting the target reading after updating again as a second synchronous time reference; the second synchronization time reference is used for the data source equipment to send a measurement data packet according to a preset time interval based on the second synchronization time reference; the time interval is associated with the number of lost data packets by the data source device during the time period from the interruption of the pulse per second to the recovery.

7. The method for time synchronization according to claim 6, wherein the step of setting the target reading after updating again as the second synchronization time reference further comprises:

determining the number of lost data packets of the data source equipment during the period from interruption to recovery of the pulse per second signal;

setting the time interval based on the number of lost data packets.

8. A data synchronization method, characterized in that the data synchronization method comprises:

acquiring a synchronization time reference by using the time synchronization method according to any one of claims 1 to 7;

acquiring a measurement data packet sent by data source equipment according to the synchronous time reference;

and carrying out output reference alignment on the measurement data packet by utilizing the original data packet sent by the satellite receiving equipment.

9. A time synchronization apparatus, characterized in that the time synchronization apparatus comprises:

the starting module is used for starting a timer in the data source equipment; the timer is used for timing to the target reading according to the second carry mode of the floating reading;

the first updating module is used for updating the target reading according to the floating reading if a pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted;

a first obtaining module for obtaining the updated target reading;

a first determination module to set the updated target reading as a first synchronization time reference; and the first synchronous time reference is used for the data source equipment to send a measurement data packet according to the first synchronous time reference.

10. A data synchronization apparatus, characterized in that the data synchronization apparatus comprises:

a calculation module for obtaining a synchronization time reference using the time synchronization method according to any one of claims 1 to 7;

an obtaining module, configured to obtain a measurement data packet sent by a data source device according to the synchronization time reference;

and the synchronization module is used for performing output reference alignment on the measurement data packet by using the original data packet sent by the satellite receiving equipment.

11. A data synchronization system, characterized in that the data synchronization system comprises: satellite receiving equipment, data source equipment and a controller; wherein the content of the first and second substances,

the controller is used for acquiring a synchronous time reference by adopting the time synchronization method according to any one of claims 1 to 7, and controlling the data source equipment to send a measurement data packet according to the synchronous time reference;

the controller is further configured to acquire the measurement data packet, and perform output reference alignment on the measurement data packet by using an original data packet sent by a satellite receiving device.

12. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 8 when executing the computer program.

13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.

Technical Field

The present invention relates to the field of satellite navigation technologies, and in particular, to a time synchronization method, a data synchronization method, an apparatus, a system, a device, and a medium.

Background

In the application of the combined navigation system, each navigation subsystem is usually an independent subsystem without a uniform time reference; for example, in a GNSS (Global Navigation Satellite System), the Satellite receiver uses atomic clock time, and other data source systems, such as an IMU (Inertial measurement unit) module, use a timer in an internal circuit to time, and each time the IMU module is started, the timing is started again from 0; the satellite receiver is consistent with the atomic clock time by means of the second point, the stability of the time interval is guaranteed, the IMU module is based on the internal crystal oscillator, therefore, the time reference of the satellite receiver is different from that of the IMU module, in the application of the navigation technology, the time reference of each navigation subsystem needs to be aligned with the time of the satellite receiver, and each navigation subsystem can be resolved by a combined navigation algorithm to obtain accurate attitude and position only after the original data is synchronously output by the same time system.

At present, a method for aligning a time reference of a navigation subsystem with a time of a satellite receiver is mainly based on an atomic clock, which is a time system of the satellite receiver, and specifically, a Pulse Per Second (PPS) signal updated by the satellite receiver is used to synchronize each data source, which has the following disadvantages: under the environment that satellite data quality is not good such as sheltering from the environment, or under the condition that the satellite receiver appears unusually, pulse per second signal output is unusual, and each data source based on pulse per second signal synchronization appears unusually because pulse per second signal is not output under this unusual state to the data accuracy of navigation has reduced.

Disclosure of Invention

In view of the above, it is necessary to provide a time synchronization method, a data synchronization apparatus, a system, a device, and a medium capable of aligning the time reference of the data source device with the time of the satellite receiving device when the pulse-per-second signal output of the satellite receiving device is abnormal.

In a first aspect, an embodiment of the present application provides a time synchronization method, where the time synchronization method includes:

starting a timer inside the data source equipment; the timer is used for timing to the target reading according to the second carry mode of the floating reading;

if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted, updating the target reading according to the floating reading;

acquiring an updated target reading;

setting the updated target reading as a first synchronization time reference; and the first synchronous time reference is used for the data source equipment to send a measurement data packet according to the first synchronous time reference.

In one embodiment, the step of updating the target reading based on the floating reading comprises:

if the floating reading reaches a carry value, accumulating the target reading by using the carry value to obtain an updated target reading;

the floating readings that reached the carry value are cleared.

In one embodiment, the method further comprises the following steps:

and if the pulse per second signal is not interrupted, updating the target reading according to the pulse per second signal, and clearing the floating reading.

In one embodiment, the method further comprises the following steps:

acquiring a current environment temperature parameter;

acquiring a target compensation value corresponding to the current environment temperature parameter according to a corresponding relation between a preset environment temperature parameter and the compensation value;

and updating the target reading according to the target compensation value.

In one embodiment, before the step of obtaining the target compensation value corresponding to the current ambient temperature parameter according to the preset corresponding relationship between the ambient temperature parameter and the compensation value, the method further includes the steps of:

testing a precision error between the float reading and the pulse per second signal based on different ambient temperature parameters;

and setting the precision error corresponding to each environment temperature parameter as a compensation value corresponding to each environment temperature parameter.

In one embodiment, after the step of setting the updated target reading as the first synchronization time reference, the method further comprises:

if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is recovered, updating the updated target reading based on the pulse per second signal;

setting the target reading after updating again as a second synchronous time reference; the second synchronization time reference is used for the data source equipment to send a measurement data packet according to a preset time interval based on the second synchronization time reference; the time interval is associated with the number of lost data packets by the data source device during the time period from the interruption of the pulse per second to the recovery.

In one embodiment, before the step of setting the target reading after updating again as the second synchronization time reference, the method further includes:

determining the number of lost data packets of the data source equipment during the period from interruption to recovery of the pulse per second signal;

setting the time interval based on the number of lost data packets.

In a second aspect, an embodiment of the present application provides a data synchronization method, where the data synchronization method includes:

acquiring a synchronous time reference by adopting the time synchronization method of the first aspect;

acquiring a measurement data packet sent by data source equipment according to the synchronous time reference;

and carrying out output reference alignment on the measurement data packet by utilizing the original data packet sent by the satellite receiving equipment.

In a third aspect, an embodiment of the present application provides a time synchronization apparatus, where the time synchronization apparatus includes:

the starting module is used for starting a timer in the data source equipment; the timer is used for timing to the target reading according to the second carry mode of the floating reading;

the first updating module is used for updating the target reading according to the floating reading if a pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted;

a first obtaining module for obtaining the updated target reading;

a first determination module to set the updated target reading as a first synchronization time reference; and the first synchronous time reference is used for the data source equipment to send a measurement data packet according to the first synchronous time reference.

In a fourth aspect, an embodiment of the present application provides a data synchronization apparatus, where the data synchronization apparatus includes:

a calculation module, configured to obtain a synchronization time reference by using the time synchronization method according to the first aspect;

an obtaining module, configured to obtain a measurement data packet sent by a data source device according to the synchronization time reference;

and the synchronization module is used for performing output reference alignment on the measurement data packet by using the original data packet sent by the satellite receiving equipment.

In a fifth aspect, an embodiment of the present application provides a data synchronization system, where the data synchronization system includes: satellite receiving equipment, data source equipment and a controller; wherein the content of the first and second substances,

the controller is configured to acquire a synchronization time reference by using the time synchronization method according to the first aspect, and control the data source device to send a measurement data packet according to the synchronization time reference;

the controller is further configured to acquire the measurement data packet, and perform output reference alignment on the measurement data packet by using an original data packet sent by a satellite receiving device.

In a sixth aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the method according to the first and second aspects when executing the computer program.

In a seventh aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method according to the first and second aspects.

The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:

starting a timer inside the data source equipment; the timer is used for timing to the target reading according to the second carry mode of the floating reading; if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted, updating the target reading according to the floating reading; acquiring an updated target reading; setting the updated target reading as a first synchronization time reference; the first synchronous time reference is used for the data source equipment to send a measurement data packet according to the first synchronous time reference; therefore, under the condition that the pulse per second signal sent to the data source equipment by the satellite receiving equipment is interrupted, the target reading is updated according to the floating reading of the timer in the data source equipment, the updated target reading is used as the first time reference of the data source equipment and the satellite receiving equipment, and the problem that in the prior art, the pulse per second signal is abnormal in output under the environment with poor satellite data quality such as a sheltering environment or under the condition that a satellite receiver is abnormal, and each data source based on pulse per second signal synchronization is abnormal because the pulse per second signal is not output, so that the data accuracy of a navigation system is reduced is solved. According to the method and the device, the effect of time synchronization of the data source equipment and the satellite receiving equipment is achieved under the condition that the pulse per second signal is interrupted, normal output of each data source is ensured, and the data precision of the navigation system is further improved.

Drawings

FIG. 1 is a diagram of an application environment for a method for time synchronization, according to an embodiment;

FIG. 2 is a flow diagram illustrating a method for time synchronization according to an embodiment;

FIG. 3 is a flowchart illustrating a method for time synchronization according to an embodiment;

FIG. 4 is a flowchart illustrating a method for time synchronization according to an embodiment;

FIG. 5 is a flowchart of a method for time synchronization according to an embodiment;

FIG. 6 is a flowchart of a method for time synchronization according to an embodiment;

FIG. 7 is a flowchart of a data synchronization method according to an embodiment;

FIG. 8 is a block diagram of an embodiment of a time synchronizer;

fig. 9 is a block diagram of a data synchronization apparatus according to an embodiment.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

The time synchronization method provided by the present application can be applied to a computer device shown in fig. 1, where the computer device can be a server, and its internal structure diagram can be shown in fig. 1. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data of the time synchronization method.

With the rapid development of GNSS (Global Navigation Satellite System), Satellite Navigation technology is applied to more and more fields. In the field of vehicles, a combined navigation technology is generally used for resolving and acquiring accurate vehicle body postures and vehicle body positions so as to be used in application scenes such as automatic navigation control and driving position tracking. Common implementations of combined navigation techniques are based on the following data sources: the combined navigation technology is realized by the aid of positioning original data output by a satellite receiver, original data output by an Inertial Measurement Unit (IMU) module fixedly connected with a vehicle body, wheel speed gear information of a vehicle or data sources such as a laser radar, visual information of a camera, map matching and the like, synchronous output data of all data source equipment is needed based on the same time reference, and accurate attitude and position can be obtained only through the original data synchronized by the same time reference through a combined navigation algorithm.

However, in the application of the integrated navigation system, each data source device is usually an independent data subsystem without a uniform time reference, for example, the satellite receiver uses an atomic clock time, and other subsystems, such as the IMU module, are clocked by a timer in its internal circuit, and the timer is restarted from 0 each time the IMU module is turned on; the satellite receiver is consistent with the atomic clock time by means of the second point, the stability of the time interval is guaranteed, the IMU module is based on the internal crystal oscillator, and therefore the time reference of the satellite receiver is different from that of the IMU module. At present, methods for aligning the time reference of the navigation subsystem and the time of the satellite receiver are all based on the time system-atomic clock of the satellite receiver, and specifically, each data source is synchronized by using a Pulse Per Second (PPS) signal updated by the satellite receiver, which has the following disadvantages: under the environment that satellite data quality is not good such as sheltering from the environment, or under the condition that the satellite receiver appears unusually, pulse per second signal output is unusual, and each data source based on pulse per second signal synchronization appears unusually because pulse per second signal is not output under this unusual state to the data accuracy of navigation has reduced.

The time synchronization method, the data synchronization method, the device, the system, the equipment and the medium provided by the embodiment of the application aim to solve the technical problem that in the traditional technology, under the environment with poor satellite data quality such as a sheltering environment or the like or under the condition that a satellite receiver is abnormal, the output of a pulse per second signal is abnormal, and each data source based on the pulse per second signal synchronization is abnormal because the pulse per second signal is not output, so that the data accuracy of a navigation system is reduced. The following describes in detail the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems by embodiments and with reference to the drawings. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.

It should be noted that, in the time synchronization method provided in the embodiments of the present application, the execution main body may be a time synchronization apparatus, and the time synchronization apparatus may be implemented as part or all of a computer device by software, hardware, or a combination of software and hardware. In the following method embodiments, the execution subject is a computer device as an example.

Referring to fig. 2, a flowchart of a time synchronization method provided in an embodiment of the present application is shown, and as shown in fig. 2, the time synchronization method in the embodiment may include the following steps:

step S100, a timer inside the data source device is started.

Wherein the timer counts the time according to the second carry of the floating reading to the target reading.

Taking the application of the satellite navigation technology to the vehicle-mounted field as an example, the combined navigation technology is used for resolving and obtaining accurate postures and positions based on positioning original data output by satellite receiving equipment, original data output by an IMU module fixedly connected with a vehicle body, wheel speed gear information of a vehicle or data sources such as a laser radar, visual information of a camera, map matching and the like, but the premise is that each data source equipment is required to output a data packet based on the same time reference.

According to the traditional time synchronization method, under the condition that the output of the pulse per second signal is abnormal, the time synchronization of each data source device and the satellite receiving device can not be realized, so that the data precision of a navigation system is reduced; in the following embodiments of the present application, a data source device is taken as an IMU module as an example, and the embodiments of the time synchronization method of the present application are described in detail. It is understood that, in other embodiments, the data source device may also be a device for outputting wheel speed gear information of a vehicle, a device for outputting visual information of a laser radar, a camera, or a device for outputting map matching information, etc.

In this embodiment, after the IMU module is powered on, a timer inside the IMU module is started, and the computer device controls the timer inside the IMU module to start timing from zero, specifically, the timing number of the timer is divided into a target reading portion and a floating reading portion, and the floating reading starts timing from zero.

And step S200, if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted, updating the target reading according to the floating reading.

If the interruption of the pulse per second signal sent by the satellite receiving equipment to the data source equipment is detected, updating the target reading according to the floating reading; specifically, the floating reading carries to the target reading in seconds, when the floating reading reaches the carry value and the computer device does not detect the pulse-per-second signal sent by the satellite receiving device to the data source device, it is determined that the pulse-per-second signal sent by the satellite receiving device to the data source device is interrupted, the computer device updates the target reading, clears the floating reading, and the floating reading starts timing from zero again.

Step S300, obtaining the updated target reading.

In this embodiment, the timer inside the IMU module is based on crystal oscillator timing, and when the computer device determines that the pulse-per-second signal sent by the satellite receiving device to the data source device is interrupted and the floating reading reaches the carry value, the target reading is updated and cleared, and the floating reading is timed from zero again to obtain an updated target reading, and obtain the updated target reading.

Step S400, setting the updated target reading as a first synchronization time reference.

The first synchronization time reference is used for the data source equipment to send the measurement data packet according to the first synchronization time reference.

The embodiment uses the updated target reading as the first synchronization time reference of the data source device, and the first synchronization time reference is used for the data source device to send the measurement data packet according to the first synchronization time reference. The IMU module sends out IMU original data at a set frequency from the moment of power-on, for example, the set frequency is 500Hz, and the IMU module sends out 500 measurement data packets per second; in this embodiment, if the pulse per second signal is interrupted, the data source device sends the measurement data packet according to the first synchronization time reference, and each sent measurement data packet includes a time when the data source device sends the data packet based on the first time reference.

It can be understood that, in the conventional technology, the time reference of the data source device is aligned with the satellite receiving device according to the received pulse per second signal, if the pulse per second signal is interrupted, the time reference of the data source device cannot be aligned with the satellite receiving device, that is, the time reference of the data source device is offset from the time of the satellite receiving device, and when the data source device sends out a data packet, the sending time included in the data packet also has an error, thereby reducing the data accuracy of the navigation system. In this embodiment, the timer inside the data source device is divided into the target reading and the floating reading, and if the pulse per second signal is interrupted and the floating reading reaches the carry value, the target reading is updated, so that the time reference of the data source device is synchronized with the satellite receiving device, thereby avoiding the situation that the time reference of the data source device cannot be synchronized with the satellite receiving device due to the interruption of the pulse per second signal.

In the embodiment, a timer inside the data source device is started; the timer is used for timing to the target reading according to the second carry mode of the floating reading; if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted, updating the target reading according to the floating reading; acquiring an updated target reading; setting the updated target reading as a first synchronization time reference; the first synchronous time reference is used for the data source equipment to send a measurement data packet according to the first synchronous time reference; therefore, under the condition that the pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted, the target reading is updated according to the floating reading of the timer in the data source equipment, and the updated target reading is used as the first time reference of the data source equipment and the time reference of the satellite receiving equipment, so that the problem that in the prior art, under the environment with poor satellite data quality such as a sheltering environment or the like or under the condition that the satellite receiver is abnormal, the output of the pulse per second signal is abnormal, and each data source based on the synchronization of the pulse per second signal is abnormal because the pulse per second signal is not output, so that the data accuracy of a navigation system is reduced is solved. According to the embodiment, the effect of time synchronization of the data source equipment and the satellite receiving equipment is achieved under the condition that the pulse per second signal is interrupted, normal output of each data source is ensured, and the data precision of the navigation system is further improved.

Fig. 3 is a flowchart illustrating a time synchronization method according to another embodiment. On the basis of the embodiment shown in fig. 2, in the time synchronization method of the present embodiment, step S200 specifically includes:

and step S210, if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted and the floating reading reaches a carry value, accumulating the target reading by using the carry value to obtain an updated target reading.

Specifically, a timer inside the IMU module is based on crystal oscillator timing, timing precision of the timer is microseconds, a unit of floating reading is microsecond, and a unit of target reading is second; when the floating reading reaches the carry value, namely the floating reading reaches 106When the second pulse signal is not detected by the computer equipment, the second pulse signal is judged to be interrupted, and the computer equipment accumulates the target reading by using the carry value, specifically, the carry value is accumulated on the target reading to obtain the accumulated target reading.

Step S220, clear the floating reading that reaches the carry value.

And after the target reading is accumulated with the carry value, resetting the floating reading reaching the carry value, and controlling a timer to start timing by taking the floating reading as zero.

It can be understood that, if the floating reading reaches the carry value again and the computer device does not detect the pulse per second signal sent by the satellite receiving device to the data source device, the carry value is used to accumulate the carry value again for the updated target reading, and the floating reading reaching the carry value again is cleared.

In the embodiment, a timer inside the data source device is started; if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is interrupted and the floating reading reaches a carry value, accumulating the target reading by using the carry value to obtain an updated target reading; resetting the floating reading reaching the carry value; acquiring an updated target reading; setting the updated target reading as a first synchronization time reference; therefore, the computer device is timed through the internal crystal oscillator of the IMU module, finds that the floating reading reaches the carry value, but does not detect the pulse per second signal at the moment, judges that the pulse per second signal is abnormally interrupted, automatically updates the target reading part, namely accumulates the positioning value on the target reading part, clears the floating reading part for recounting, realizes that the time reference of the IMU module is still synchronous with the time reference of the satellite receiving device under the abnormal interruption state of the pulse per second signal, ensures the reliability of the original data of the IMU, and improves the data precision of the navigation system.

Fig. 4 is a flowchart illustrating a time synchronization method according to another embodiment. On the basis of the embodiment shown in fig. 3, the method further includes the steps of:

and S500, if the pulse per second signal is not interrupted, updating the target reading according to the pulse per second signal, and clearing the floating reading.

When the satellite receiving equipment normally updates the pulse per second signal, at the moment that the IMU module receives the pulse per second signal, the computer equipment performs accumulated counting on the whole second part, namely, one second is added to the target reading, the floating reading is cleared and recounted, and the IMU module sends a measurement data packet outwards by taking the updated target reading as a time reference; at the moment that the IMU module receives the next second pulse signal, the computer equipment accumulates the target reading for one second again, and clears the floating reading and counts again; therefore, time synchronization between the data source device and the satellite receiving device is achieved based on the pulse per second signal updated by the satellite receiving device.

Fig. 5 is a flowchart illustrating a time synchronization method according to another embodiment. On the basis of the embodiment shown in fig. 3, after step S200, the time synchronization method of this embodiment further includes:

step S610, acquiring a current ambient temperature parameter.

In the case of interruption of the pulse per second signal sent by the satellite receiving device to the data source device, the computer device updates the target reading according to the floating reading of the timer, namely, in the case of interruption of the pulse per second signal, the precision of the target reading is determined by the precision of the floating reading.

The timer inside the data source is different in timing accuracy because the environment temperature in which the timer works is different; for example, the timer inside the IMU module is based on crystal timing, and the precision of the crystal timing is different due to the difference of the current ambient temperature.

The embodiment first obtains a current ambient temperature parameter of a timer inside the data source device.

Step S620, obtaining a target compensation value corresponding to the current ambient temperature parameter according to a corresponding relationship between a preset ambient temperature parameter and a compensation value.

In the use of the STM32 chip, the precision error of the crystal oscillator timing of the general consumer grade is 20 microseconds, the data is actually measured at normal temperature (25 ℃) by comparing a pulse per second signal, the pulse per second signal is triggered by the satellite atomic clock timing, and the pulse per second signal is generally regarded as a precise signal without time error. That is, in the normal temperature environment, the timer has an error of 20 microseconds per second.

Specifically, continuing to take the IMU module as an example, the timer inside the IMU module works in a normal temperature environment, during the interruption of the pulse signal per second, when the floating reading counts to 999980 microseconds, the timer will consider that the floating reading reaches the carry value, and the computer device will accumulate 999980 microseconds to the target reading, that is, in the normal temperature environment, the precision error of the crystal oscillator timing compared with the pulse signal per second is 20 microseconds different, and if the precision error of the timer is to be eliminated, the 20 microseconds different per second needs to be compensated.

The computer equipment of the embodiment acquires a target compensation value corresponding to the current environment temperature parameter according to the corresponding relation between the preset environment temperature parameter and the compensation value; in this embodiment, for the current internal timer of the IMU module, a corresponding relationship between the ambient temperature parameter and the compensation value is preset, for example, when the ambient temperature parameter is 25 ℃, the corresponding compensation value is 20 microseconds, and the target compensation value corresponding to the current ambient temperature parameter is obtained in this embodiment.

Step S630, updating the target reading according to the target compensation value.

Further, the target reading is updated according to the target compensation value, for example, the timer works at 25 ℃ of the ambient temperature parameter, the target compensation value is obtained as 20 microseconds by searching the corresponding relation between the preset ambient temperature parameter and the compensation value, and the 20 microseconds are accumulated in the target reading, so that the 20 microseconds error existing in each second of the floating reading is compensated through the compensation of the target compensation value, the precision of the time reference of the data source device compared with the time reference of the satellite receiving device is improved under the condition that the pulse signal per second is interrupted, and the requirement of an application scene with high precision requirement is met. In the present embodiment, the step of updating the target reading according to the floating reading is performed before step S630; as an implementation manner, if the pulse per second signal sent by the satellite receiving device to the data source device is interrupted, the target reading is updated according to the floating reading, and then the target reading updated based on the floating reading is updated again according to the obtained target compensation value corresponding to the current environment temperature parameter, so as to obtain the updated target reading. It should be noted that the steps of updating the target reading according to the floating reading and updating the target reading according to the target compensation value do not have a strict sequence limitation, and may be performed simultaneously.

In other embodiments, the step of updating the target reading according to the floating reading may also be performed after step S630, specifically, if the pulse per second signal sent by the satellite receiving device to the data source device is interrupted and the floating reading reaches a carry value, the target reading is updated according to the obtained target compensation value corresponding to the current ambient temperature parameter, and then the carry value is accumulated for the target reading updated based on the target compensation value, so as to obtain an updated target reading. The embodiment is not particularly limited herein.

Further, before step S620, the present embodiment further includes:

and step S640, testing the precision error between the floating reading and the pulse per second signal based on different environment temperature parameters.

In this embodiment, a calibration test is performed on a crystal oscillator actually used by a timer in an IMU module, and the precision error of the crystal oscillator with respect to a pulse per second signal is respectively tested at different environmental temperatures, and the precision error of the crystal oscillator with respect to the pulse per second signal is the precision error between a floating reading and the pulse per second signal; as an embodiment, a comparison table of "temperature-precision error" is output, and the temperature test range of this embodiment is the operating temperature range of the IMU module: -40 ℃ to 85 ℃, and testing the precision error between the floating reading and the pulse per second signal under different environmental temperature parameters by 5 ℃ stepping respectively.

Step S650, setting the accuracy error corresponding to each ambient temperature parameter as a compensation value corresponding to each ambient temperature parameter.

The precision error corresponding to each environment temperature parameter obtained by the test is used as a compensation value corresponding to the floating reading of the timer under the environment temperature parameter; after the compensation value is obtained, the floating reading reaches a carry value, the carry value is accumulated for the target reading, and the compensation value is compensated, so that under the condition that the pulse per second signal is interrupted, the precision of the time reference of the data source equipment compared with the precision of the time reference of the satellite receiving equipment is improved, the source data precision of the navigation system is further improved, and the requirement of an application scene with high precision requirement is met.

Fig. 6 is a flowchart illustrating a time synchronization method according to another embodiment. On the basis of the embodiment shown in fig. 3, after step S400, the time synchronization method of this embodiment further includes:

step S710, if the pulse-per-second signal sent by the satellite receiving device to the data source device is recovered, updating the updated target reading based on the pulse-per-second signal.

And if the pulse per second signal sent by the satellite receiving equipment to the data source equipment is recovered, accumulating the current target reading of the timer for 1 second at the moment when the data source equipment receives the pulse per second signal sent by the satellite receiving equipment, and resetting the floating reading to restart timing.

Step S720, setting the target reading after being updated again as a second synchronization time reference, where the second synchronization time reference is used for the data source device to send a measurement data packet according to a preset time interval based on the second synchronization time reference.

The time interval is associated with the number of lost packets by the data source device during the time between the interruption of the pulse of seconds to the recovery.

In the practical implementation process, the pulse signal per second is abnormally interrupted for 5-10 minutes, within the 5-10 minutes, the time synchronization precision of the IMU module is completely maintained by the crystal oscillator of the timer inside the IMU module, the crystal oscillator has 20 microsecond deviation per second under the normal temperature environment (25 ℃), and under the accumulation state of 5-10 minutes, the deviation of 6-12 milliseconds is accumulated totally, which is shown in the last second before the pulse signal per second returns to normal, and the floating reading is carried to the target reading only by timing 988 plus 994 milliseconds; in the integrated navigation technology, the data frequency provided by the IMU module is required to be at least 100Hz, the frequency of the original data output by the IMU module is generally 500-.

In this embodiment, after the pulse per second signal is recovered to normal, the time interval of the outgoing measurement data packet of the data source device within a period of time after the pulse per second signal is changed, so as to compensate the lost data packet of the data source device during the period of interruption of the pulse per second signal.

Further, before step S720, the method further includes:

step S730, determining the number of lost data packets of the data source device during the period from the interruption of the pulse per second to the recovery.

Step S740, setting the time interval based on the number of the lost data packets.

Specifically, taking 10 ms as an example of the cumulative error caused by the interruption of the pulse per second (i.e. the target reading actually only includes 990 ms in the previous second of the pulse per second recovery), and continuing to take 500Hz as an example of the frequency of the data source device, the data source device sends out 500 measurement packets in one second, and then the 10 ms error causes the data source device to lose 5 measurement packets in the second, and the 5 lost measurement packets need to be made up.

The error of 20 microseconds is calculated when the acceptable error of the IMU module timer is 1 second, that is, the error of 10 milliseconds needs at least 500 seconds for equalization, the 5 lost data packets are compensated into the 500 second period after the pulse per second signal is recovered to normal, then during the 500 second period, the time interval between each measurement data packet sent out by the data source device is 500 seconds/(500 × 500+5) ═ 1.99996 milliseconds, that is, in order to compensate the 5 lost data packets, during the 500 second period after the pulse per second signal is recovered to normal, the data source device needs to send out the measurement data packets at the time interval of 1.99996 milliseconds, and thus 250005 data packets are sent out in 500 seconds; after 500 seconds, the data source device continues to send the normal outgoing measurement data at the normal outgoing frequency, i.e., 500 measurement packets per second, and it is understood that the 1.99996 ms time interval is determined according to the number of the lost packets, thereby compensating for the lost packets.

The embodiment effectively solves the problem that the measurement data packet is lost due to the timing error of the timer inside the data source equipment during the interruption of the pulse per second signal sent to the data source equipment by the satellite receiving equipment, improves the data precision of the navigation system in the abnormal state of the pulse per second signal, and improves the accuracy of the navigation result.

Referring to fig. 7, which shows a flowchart of a data synchronization method provided in an embodiment of the present application, as shown in fig. 7, the data synchronization method of the present embodiment includes the following steps:

step S10, obtaining a synchronization time reference by using the time synchronization method described in any of the above embodiments.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种船用低速发动机主控制单元冗余的方法及装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!