Seamless data synchronization device and method indoors and outdoors

CN119555059BActive Publication Date: 2026-08-07NAT INNOVATION INST OF DEFENSE TECH PLA ACAD OF MILITARY SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NAT INNOVATION INST OF DEFENSE TECH PLA ACAD OF MILITARY SCI
Filing Date
2024-11-06
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

但该方法部署和维护成本高,需要专门的硬件支持,且对网络和设备的要求较高,并不适用于UGV、UAV等小型化移动机器人设备

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119555059B_ABST
    Figure CN119555059B_ABST
Patent Text Reader

Abstract

The application discloses an indoor and outdoor seamless data synchronization device and method, which comprises a GNSS module, an inertial measurement module and a programmable control module, wherein the GNSS module is used for receiving a 1PPS signal and GPRMC information generated by an external atomic clock; the inertial measurement module is used for performing fusion processing on position information generated by the GNSS module to generate position, attitude and speed information; the programmable control module is connected with the GNSS module and the inertial measurement module through a serial port and is used for receiving the 1PPS signal and the GPRMC information of the GNSS module, aligning a square wave generated by a local clock with the 1PPS signal square wave of the GNSS module, simultaneously performing frequency division on the square wave according to a preset frequency, continuously and stably outputting a pulse wave signal and time information of a corresponding frequency through the serial port, calibrating a clock signal through an external calibration factor, and setting an algorithm model in the programmable control module; when indoor and outdoor data are synchronized, the algorithm model is called to perform deviation calculation and smoothing processing on signals that need to be aligned, so that the indoor and outdoor data are synchronized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a device and method for seamless indoor and outdoor data synchronization. Background Technology

[0002] In fields such as drones, autonomous driving, and robotics, using heterogeneous sensors to acquire environmental information and perform fusion processing can improve information redundancy and form a multi-dimensional mapping of the environment and state of the unmanned system, thereby improving the accuracy and reliability of perception. This has significant theoretical and engineering practical value. The purpose of time synchronization is to provide a unified time reference for heterogeneous sensors with different frequencies, ensuring that the collected data accurately represents the environmental information within the same time frame. Maintaining the time reference mainly involves two aspects: First, maintaining the time measurement scale; because each sensor's clock source has different clock drift (i.e., each clock's 1-second duration differs), even if the timestamps of each sensor are aligned at the initial moment, the previously aligned results will still deviate after a period of operation. Second, unifying the sampling time; the sampling frequencies of each sensor are not consistent. Even if the initial sampling times of each sensor are precisely aligned, subsequent sampling will still produce deviations. Therefore, unifying the sampling time is generally achieved by marking the data from different sensors with a unified time label.

[0003] To address the aforementioned multi-sensor time synchronization issues, existing lightweight and low-power time synchronization solutions mainly fall into two categories:

[0004] The first type uses GNSS as the core, achieving time synchronization through the 1PPS signal output by GNSS and GPRMC time information. For example, an STM32 microcontroller simultaneously receives the "sampling complete" pulse signal from the IMU and the 1PPS signal from the GNSS receiver, triggering interrupts for each and recording the current local crystal oscillator time. Using the local crystal oscillator time corresponding to the 1PPS signal and the GNSS GPRMC time, the offset of the local crystal oscillator time relative to the GNSS absolute time can be calculated. This offset is then compensated for by applying it to the local crystal oscillator time corresponding to the IMU's "sampling complete" signal, thus converting the IMU's local timescale to the GNSS absolute timescale, achieving time synchronization between GNSS and the IMU. Another example is using an FPGA to receive the GNSS 1PPS signal and generate a high-frequency synchronization pulse sequence based on the rising edge of the PPS signal, sending it to the IMU to trigger synchronous data acquisition by the IMU and generating a TOV pulse marked with the timestamp of the high-frequency synchronization pulse sequence, achieving time synchronization between GNSS and the IMU.

[0005] While the aforementioned GNSS-based time synchronization strategy offers high accuracy, its application is limited, and time synchronization cannot be achieved in environments where GNSS is denied, such as indoors.

[0006] The second type involves using a timing self-generation module to generate stable pulse trigger signals for external sensors. Data sampling timestamps are synchronized softly via a host computer. For example, the field synchronization signal from an infrared camera can be used as the trigger source for the entire system. This signal is converted into trigger pulse signals acceptable to other subsystems via a frequency conversion module to synchronously trigger data acquisition from each sensor. The system timestamp is recorded in the host computer to achieve timing synchronization of multi-source data. Another example is using a sampling timing generation module to generate three strict trigger signals: a base period, inertial data acquisition, and visual data acquisition. Two of these data acquisition signals control inertial and visual data acquisition respectively. When the timing encoding module receives a base period signal, it increments a counter at integer intervals. When it receives inertial or visual data acquisition trigger signals, it synchronizes the corresponding counters to the base period signal's counter.

[0007] The aforementioned self-generated time series method is less accurate than GNSS-based methods in terms of maintaining time scale and counting timestamps.

[0008] Unmanned systems require accurate, secure, and economical time synchronization systems to fuse multi-source data. To address the aforementioned problems, the most commonly used large-scale time synchronization technologies are NTP (Network Time Protocol) and PTP (Precision Time Protocol) servers. NTP is a software protocol that distributes time information over the internet to synchronize the time of various devices. However, NTP relies on network communication between the host and a clock server, and communication conditions are difficult to guarantee in the complex environments of unmanned systems, making it unsuitable for time synchronization between sensors. Similarly, PTP is a hardware protocol that achieves nanosecond-level time synchronization through hardware timestamps and precise clock synchronization algorithms. However, this method has high deployment and maintenance costs, requires specialized hardware support, and has high requirements for networks and equipment, making it unsuitable for miniaturized mobile robots such as UGVs and UAVs. Summary of the Invention

[0009] To address some or all of the technical problems existing in the prior art, the present invention provides a seamless indoor and outdoor data synchronization device and method, which can achieve accurate time synchronization of multi-sensor data of unmanned systems in indoor and outdoor environments.

[0010] The technical solution of the present invention is as follows:

[0011] In a first aspect, the present invention provides a seamless indoor-outdoor data synchronization device, comprising:

[0012] The GNSS module is used to receive the 1PPS signal and GPRMC information generated by an external atomic clock;

[0013] An inertial measurement module is used to fuse the positioning information generated by the GNSS module to generate position, attitude, and velocity information.

[0014] The programmable control module (PCC) is connected to the GNSS module and the inertial measurement module via a serial port. It receives the 1PPS signal and GPRMC information from the GNSS module, as well as the position, attitude, and velocity information generated by the inertial measurement module. It aligns the square wave generated by the local clock with the 1PPS signal square wave from the GNSS module, and divides the square wave according to a preset frequency. It continuously and stably outputs pulse wave signals and time information of the corresponding frequency through the serial port, and calibrates the clock signal using an external calibration factor. The PCC also includes an algorithm model that, when synchronizing indoor and outdoor data, calculates and smooths the deviation of the signals to be aligned, thus synchronizing the indoor and outdoor data.

[0015] Furthermore, in the aforementioned seamless indoor-outdoor data synchronization device, the programmable control module includes an FPGA chip.

[0016] Furthermore, in the aforementioned seamless indoor-outdoor data synchronization device, the inertial measurement module includes an IMU.

[0017] Furthermore, in the aforementioned seamless indoor-outdoor data synchronization device, the inertial measurement module includes:

[0018] An inertial measurement unit (IMU) is connected to an external first power module, which supplies power to the IMU. The IMU is used to measure acceleration and angular velocity during motion.

[0019] A connector, wherein the connector is provided with a plug-in interface and an external interface;

[0020] The integrated navigation calculation chip is connected to the connector through the connector interface and connected to the programmable control module through the external interface. The integrated navigation calculation chip is used to fuse the measurement data generated by the inertial measurement unit and the positioning information generated by the GNSS module to generate position, attitude and velocity information.

[0021] A mounting base is fixedly connected to the inertial measurement unit and the integrated navigation calculation chip, and is used to fix the inertial measurement unit and the integrated navigation calculation chip.

[0022] Furthermore, in the aforementioned seamless indoor-outdoor data synchronization device, the GNSS module includes:

[0023] The second power module is used to supply power.

[0024] Antenna, the antenna being used to receive the 1PPS signal and GPRMC information generated by the external atomic clock;

[0025] A GNSS chip, which is connected to the second power module and the antenna, is used to locate the position of the antenna receiving the 1PPS signal and GPRMC information generated by the atomic clock.

[0026] Furthermore, in the aforementioned seamless indoor-outdoor data synchronization device, the calibration factor includes a frequency offset parameter and a phase deviation parameter, and the parameters can be defined and set in the programmable control module for data reception.

[0027] Secondly, the present invention also provides a method for seamless indoor and outdoor data synchronization using the above-mentioned seamless indoor and outdoor data synchronization device, comprising:

[0028] The local time is calibrated by receiving external time information from the GNSS module, so that the 1PPS time recorded by the GNSS module in the programmable control module is aligned with the timing triggered by the programmable control module based on the rising edge of the GNSS module's PPS.

[0029] Calculate the deviation between the two PPS signals, and use the programmable control module to simulate and generate the GPRMC signal TOD.

[0030] The deviation is corrected to synchronize the aligned time with global standard time, so that the indoor and outdoor times are the standard time truncation.

[0031] Furthermore, in the aforementioned seamless indoor-outdoor data synchronization method, the deviation between the two PPS signals is calculated using the following formula:

[0032] Δt = T2 - T1;

[0033] Where: Δt represents the difference between the two PPS signals, T2 represents the 1 PPS time received by the programmable control module from the GNSS module, and T1 represents the timing triggered by the programmable control module based on the rising edge of the PPS signal from the GNSS module;

[0034] Meanwhile, in order to make the deviation between the two PPS signals more accurate, an array needs to be set up during the calculation process to record the difference Δt between the two PPS signals in a loop and solve for its average value Δt0.

[0035] The average value Δt0 is calculated using the following formula:

[0036] Δt0=(err[0]+err[1]+…err

[99] ) / 100;

[0037] Where: err[] represents the array set when calculating the difference Δt between two PPS signals, and the specific number of arrays is set according to actual needs.

[0038] Furthermore, in the aforementioned seamless indoor-outdoor data synchronization method, the use of the programmable control module to simulate and generate the GPRMC signal TOD includes:

[0039] Determine the format and protocol of the GPRMC signal, and use a programmable control module to write the corresponding protocol code to generate data packets that conform to the GPRMC format;

[0040] In the code, start and end symbols are generated, data for each field is generated as needed, and the generated data packet is sent to the sensor device through the output serial port of the programmable control module.

[0041] When the GNSS module is locked, the received GPRMC is directly used as the TOD. After the GNSS module is unlocked, it continues to output the TOD through the 1PPS timing generated by itself.

[0042] Furthermore, in the above-mentioned seamless indoor and outdoor data synchronization method, correcting the deviation to synchronize the aligned time with the global standard time, so that the indoor and outdoor times are the standard time segments, includes: using a smoothing method to realign the waveforms corresponding to the times of the two PPS, so that the deviation between the times of the two PPS is eliminated;

[0043] The smoothing method includes:

[0044] In the process of calculating the deviation between two PPS signals, one or more variables are set, and the magnitude of the deviation is continuously calculated to align the time between the two PPS signals. The number of alignment attempts is automatically calculated until the value of the variable used to calculate the deviation is 0, thus achieving deviation elimination. The following formula is used for calculation during the deviation elimination process:

[0045] t2=t1+(T2-T1)+Δt0×(T2-T1) / (T3-T1);

[0046] Where: T1 represents the starting value corresponding to 1PPS generated by the system, T2 represents the local clock count value at the IMU sampling time, T3 represents the local clock count value at the termination time, and t1 and t2 represent the variables set in the process of calculating the deviation between the two PPS signals, where t1 represents the TOD time corresponding to T1, and t2 represents the TOD time at the IMU sampling time.

[0047] The main advantages of the technical solution of this invention are as follows:

[0048] This invention discloses a seamless indoor-outdoor data synchronization device, comprising a GNSS module, an inertial measurement module, and a programmable control module. The programmable control module aligns a square wave signal generated by a local clock with a 1PPS signal generated by the GNSS module, and performs frequency division according to a set frequency. It continuously and stably outputs pulse wave signals and time information of the corresponding frequency via a serial port. An external calibration factor is used to calibrate the clock signal, ensuring that the aligned time is synchronized with global standard time, making both indoor and outdoor times the same as the standard time. An algorithm model is set within the programmable control module. During indoor-outdoor data synchronization, the algorithm model is invoked to calculate and smooth the signals to be aligned, resulting in accurate indoor-outdoor data synchronization. The method of determining whether indoor and outdoor time are synchronized based on the alignment of the two PPS signals provides high accuracy. This device enables precise time synchronization of multi-sensor data from unmanned systems in both indoor and outdoor environments. It features lightweight design, high precision, and low power consumption, and can continuously and stably provide a time reference with microsecond-level accuracy in complex indoor and outdoor environments. It is suitable for small unmanned systems such as UGVs and UAVs. Attached Figure Description

[0049] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and constitute a part of this invention, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0050] Figure 1 This is a schematic diagram of the structure of an indoor-outdoor seamless data synchronization device according to an embodiment of the present invention;

[0051] Figure 2 This is a schematic diagram of the principle of a seamless indoor-outdoor data synchronization device provided in an embodiment of the present invention;

[0052] Figure 3 This is a schematic diagram of the inertial measurement module in an indoor-outdoor seamless data synchronization device provided in an embodiment of the present invention;

[0053] Figure 4 This is a schematic diagram of the structure of the GNSS module in an indoor-outdoor seamless data synchronization device provided in an embodiment of the present invention;

[0054] Figure 5 This is a schematic diagram illustrating the process of calling an algorithm model to calculate the deviation and smooth the signal that needs to be aligned in a seamless indoor-outdoor data synchronization method provided in an embodiment of the present invention.

[0055] Figure 6This is a schematic diagram illustrating the time alignment between the 1PPS output of the internal clock of the programmable control module and the 1PPS of the GNSS module in an indoor-outdoor seamless data synchronization method provided in an embodiment of the present invention.

[0056] Figure 7 This is a schematic diagram illustrating the signal switching process before and after GNSS loss in an indoor-outdoor seamless data synchronization method provided by an embodiment of the present invention.

[0057] Figure 8 This is a schematic diagram illustrating the time synchronization between the inertial measurement unit and the GNSS module in an indoor-outdoor seamless data synchronization method provided by an embodiment of the present invention.

[0058] Figure 9 This is a schematic diagram illustrating the process of synchronizing other sensors with GNSS time in an indoor-outdoor seamless data synchronization method provided in an embodiment of the present invention.

[0059] Figure 10 This is a flowchart illustrating a method for seamless indoor and outdoor data synchronization according to an embodiment of the present invention.

[0060] Explanation of reference numerals in the attached figures:

[0061] 1. GNSS module;

[0062] 101. Second power supply module; 102. Antenna; 103. GNSS chip;

[0063] 2. Inertial Measurement Module;

[0064] 201. Inertial Measurement Unit; 202. Connector; 203. Integrated Navigation Calculation Chip; 204. Mount; 205. First Power Supply Module;

[0065] 3. Programmable control module. Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0067] The technical solutions provided by the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0068] First, a brief explanation of the technical terms used in this application will be provided.

[0069] UART (Universal Asynchronous Receiver / Transmitter): This stands for Universal Asynchronous Receiver / Transmitter, a universal serial data bus used for asynchronous communication. This bus also features bidirectional communication capabilities, enabling full-duplex transmission and reception.

[0070] 1PPS (One Pulse Per Second) signal is a precise time signal in a GPS module, generating one pulse signal per second for time synchronization and accurate timing. It features high stability and low error.

[0071] TOD (Time of Day) is a time synchronization technology based on the computer system's clock, which synchronizes the computer system's clock to global standard time.

[0072] GNSS (Global Navigation Satellite System): A global navigation satellite system, also known as a global satellite navigation system, is a space-based radio navigation and positioning system that can provide users with all-weather 3D coordinates, velocity, and time information at any location on the Earth's surface or in near-Earth space.

[0073] FPGA (Field Programmable Gate Array) is a product of further development based on programmable devices such as PAL (Programmable Array Logic) and GAL (General Purpose Array Logic).

[0074] RTCM (Radio Technical Commission for Maritime Services) refers to a set of standard protocols developed for the application of radio technology in maritime services.

[0075] GPRMC (Recommended Minimum Specific GNSS Data) messages contain information such as the location, velocity, and heading of the positioning device, and are one of the most basic and commonly used formats of GPS positioning data. These messages are typically sent periodically by the positioning device and are widely used in many applications to obtain real-time location information. Understanding the specific format and meaning of GPRMC messages is necessary to effectively extract the positioning information.

[0076] As attached Figure 1-10As shown, the purpose of this invention is to design and develop a lightweight, high-precision, and low-power time synchronization device and algorithm for integrated indoor and outdoor time synchronization applications, combining miniaturized unmanned systems with the goal of achieving accurate time synchronization of multi-sensor data from unmanned systems in both indoor and outdoor environments. To address the technical problems existing in the prior art and achieve the above objective, this invention provides a seamless indoor and outdoor data synchronization device, which includes: a GNSS module 1, an inertial measurement module 2, and a programmable control module 3, as shown... Figure 1 As shown, where:

[0077] GNSS module 1 receives the 1PPS signal and GPRMC information generated by an external atomic clock; inertial measurement module 2 fuses the positioning information generated by GNSS module 1 to generate position, attitude, and velocity information; programmable control module 3 is connected to GNSS module 1 and inertial measurement module 2 via a serial port, and receives the 1PPS signal and GPRMC information from GNSS module 1, as well as the position, attitude, and velocity information generated by inertial measurement module 2. It aligns the square wave generated by the local clock with the square wave of the 1PPS signal from GNSS module 1, and divides the square wave according to a preset frequency. It continuously and stably outputs the corresponding frequency pulse wave signal and time information through the serial port, and calibrates the clock signal through an external calibration factor. At the same time, the programmable control module 3 has an algorithm model set up. When synchronizing indoor and outdoor data, the algorithm model is called to calculate the deviation and smooth the signal that needs to be aligned, so as to synchronize the indoor and outdoor data.

[0078] The following combination Figure 2 A detailed explanation of the principle of the seamless indoor-outdoor data synchronization device of the present invention:

[0079] The programmable control module 3 receives PPS signal data transmitted via a 6-pin or 3-pin interface converted by an RS232 converter, sampled pulse data transmitted via a 3-pin interface converted by a power conversion module, data transmitted via a 3-pin interface received and input by the inertial measurement module 2 via a serial port, and 1PPS signal and GPRMC information transmitted via a 6-pin interface output by the GNSS module 1 via a serial port and received via the RS232 protocol. Subsequently, the programmable control module 3 aligns the square wave signal generated by the local clock with the 1PPS signal generated by the GNSS module 1, divides the frequency according to the set frequency, and continuously and stably outputs the corresponding frequency pulse wave signal and time information via the serial port. It also calibrates the clock signal by accessing an external calibration factor to synchronize the aligned time with the global standard time, so that the indoor and outdoor time are the standard time. The method of determining whether indoor and outdoor time is synchronized by calculating whether two PPS signals are aligned is accurate and highly precise. It can achieve precise time synchronization of multi-sensor data of unmanned systems in indoor and outdoor environments. It features lightweight, high precision, and low power consumption, and can continuously and stably provide a time reference with microsecond-level accuracy in complex indoor and outdoor environments. It is applicable to small unmanned systems such as UGVs and UAVs.

[0080] Specifically, by utilizing high-precision frequency division technology and under external PPS calibration, it can continuously and accurately output analog PPS signals and TOD information, which includes accurate time information. After reacquiring GNSS module 1 information, it can automatically use GNSS module 1 information to calibrate the internal clock, thus solving the problem of discontinuous time information of GNSS module 1 in complex indoor and outdoor environments.

[0081] In this context, the frequency division in the aforementioned high-precision frequency division technology is to convert a 1Hz square wave into a higher frequency, such as 10Hz or 50Hz.

[0082] Specifically, the following further explains how the present invention achieves continuous and accurate output of analog PPS signals and TOD information under external PPS calibration:

[0083] The internal crystal oscillator can generate a 1Hz square wave, but its frequency stability is not high; that is, the 1-second interval is not strictly 1 second. The external 1Hz PPS received via GNSS is generated by an atomic clock on the satellite, and its frequency is quite stable. Calibration is achieved by aligning the internally generated 1Hz square wave with the PPS each time. Generating a stable 1Hz PPS only guarantees that the second length is stable, but it doesn't know the specific time corresponding to each rising edge of the PPS. For example, the time corresponding to a certain rising edge in a certain region can be accurate to the second. Since the external PPS and GNSS oscillator are bundled together, and the received GNSS oscillator contains time stamp information, the time stamp of the external PPS can be determined. By aligning the square wave with the PPS, the corresponding time stamp of the square wave can be obtained, and then this time stamp can be encoded into TOD information according to the GNSS oscillator protocol format.

[0084] Preferably, the programmable control module 3 is an FPGA chip. Compared with traditional microcontrollers, which have relatively low clock frequencies and large errors, this invention uses a high-frequency FPGA chip with a main frequency of up to 400MHz. The generated clock signal is more accurate and easier to port. It does not depend on the wiring delay of each logic device, which is beneficial for device portability.

[0085] Preferably, the inertial measurement module 2 described above is an IMU.

[0086] Specifically, in the indoor-outdoor seamless data synchronization device of the present invention, the inertial measurement module 2 is as follows: Figure 3 As shown, it includes: an inertial measurement unit 201, a connector 202, a combined navigation solution chip 203, and a mounting base 204, wherein:

[0087] The inertial measurement unit 201 is connected to an external first power supply module 205, enabling the first power supply module 205 to power the inertial measurement unit 201. The inertial measurement unit 201 is used to locate the position of the 1PPS signal and GPRMC information generated by the atomic clock. The connector 202 is provided with a connector interface and an external interface. The integrated navigation calculation chip 203 is connected to the connector 202 through the connector interface and is connected to the programmable control module 3 through the external interface. The integrated navigation calculation chip 203 is used to calculate the positioning data generated by the inertial measurement unit 201. The mounting bracket 204 is fixedly connected to the inertial measurement unit 201 and the integrated navigation calculation chip 203, and is used to fix the inertial measurement unit 201 and the integrated navigation calculation chip 203.

[0088] Specifically, in the seamless indoor-outdoor data synchronization device of the present invention, the GNSS module 1 is as follows: Figure 4 As shown, it includes: a second power supply module 101, an antenna 102, and a GNSS chip 103, wherein:

[0089] The second power module 101 is used to supply power; the antenna 102 is used to receive the 1PPS signal and GPRMC information generated by the external atomic clock; the GNSS chip 103 is connected to the second power module 101 and the antenna 102, and is used to locate the position of the antenna 102 receiving the 1PPS signal and GPRMC information generated by the atomic clock.

[0090] Preferably, the calibration factors mentioned above mainly include frequency offset parameters and phase deviation parameters, or parameters related to frequency offset and phase deviation, and the above parameters can be defined and set in the programmable control module 3 for data reception.

[0091] Specifically, the algorithm models set in the programmable control module 3 of this invention include Cristian algorithm, Berkeley algorithm and Averaging algorithm, etc., which are mainly used to calculate the deviation between two or more PPS, calculate the maintenance count and smoothing of the deviation between two or more PPS, and after the deviation between two PPS is 0, so that the waveforms corresponding to the time of the two PPS are re-aligned, the aligned local time information is re-compiled according to the standard protocol format.

[0092] Specifically, when synchronizing indoor and outdoor data, the algorithm model is invoked to calculate the deviation and smooth the signals that need to be aligned, so that the method of synchronizing indoor and outdoor data is as follows: Figure 5 As shown, it includes the following steps:

[0093] a) External clock signal: The UTC time and second pulse of high-precision GNSS are used as the external reference for calibration and synchronization.

[0094] b) Receive clock signal: Receive reference clock signal using the input interface of programmable control module 3 and input it into programmable control module 3.

[0095] c) Extract clock information: Parse the time information from the received clock signal to obtain parameters such as the frequency and phase of the 1PPS signal.

[0096] d) Calibrate the local clock: Adjust the frequency of the square wave generated based on the local clock according to the external time reference to achieve calibration and synchronization of the square wave output based on the local clock inside the programmable control module 3.

[0097] e) Achieve clock synchronization: Inside the programmable control module 3, calculate the error between the local clock and the GNSS module 1 clock, and manually make up the error.

[0098] f) Verify clock synchronization: Verification and testing are achieved by comparing the frequency difference parameters of clock signals between different modules or nodes to ensure the accuracy and stability of clock synchronization.

[0099] g) Drive the sensors: Send the data stream with precise clock information to each sensor in a custom format (TOD and PPS) to collect data with timestamp information.

[0100] Specifically, UTC (Universal Time Coordinated) refers to Coordinated Universal Time, also known as World Unified Time, World Standard Time, or International Coordinated Time.

[0101] Secondly, the present invention also provides a method for seamless indoor and outdoor data synchronization using the aforementioned seamless indoor and outdoor data synchronization device, such as... Figure 10 As shown, it includes:

[0102] The local time is calibrated using the external time information received by GNSS module 1, so that the 1PPS time recorded by GNSS module 1 in programmable control module 3 is aligned with the timing triggered by the rising edge of 1PPS from GNSS module 1 in programmable control module 3; the deviation between the two PPS signals is calculated, and the GPRMC signal TOD is generated by programmable control module 3; the deviation is corrected so that the aligned time is synchronized with global standard time, so that the indoor and outdoor time are the standard time.

[0103] Specifically, since the core function of the programmable control module 3 in this invention is to realize the continuous output of seamless indoor and outdoor time synchronization signals, the programmable control module of this invention autonomously generates a stable time reference and calibrates the local time through the time information of the external GNSS module 1.

[0104] Specifically, during the calibration of the local time using time information from the external GNSS module 1, the timescale error of the 1PPS signal provided by GNSS module 1, generated by an atomic clock, is typically tens of nanoseconds and can be ignored. The programmable control module 3 typically uses a microsecond-level counter for the local crystal oscillator time. Therefore, the synchronization accuracy between GNSS data and the local crystal oscillator time depends on the accuracy of the local time, i.e., at the microsecond level. Thus, it is necessary to calibrate the local time using the externally input time information received by GNSS module 1, ensuring that the 1PPS time recorded by GNSS module 1 in the programmable control module 3 is aligned with the timing triggered by the rising edge of the 1PPS signal from the GNSS module. During this alignment process, the deviation between the two PPS signals needs to be calculated.

[0105] like Figure 6As shown, T2 represents the GNSS 1PPS time recorded by the FPGA, T1 represents the 1PPS time generated by the FPGA based on the rising edge of the GNSS PPS and the 1PPS time generated by its external quartz crystal oscillator. Δt = T2 - T1 represents the difference between the two PPS signals, that is, the one-second deviation between the atomic clock and the local crystal oscillator.

[0106] The purpose of alignment is to bring Δt infinitely close to 0; the absolute value of this value is used to measure the magnitude of the deviation. The deviation between two PPS signals is calculated to align the square waves that generate the two PPS signals. Alignment methods include:

[0107] The programmable control module 3 uses the counter function in the timer to capture GNSS-PPS pulses. It starts counting when it receives a rising edge signal and stops counting when it receives a falling edge, recording the duration T2. ​​At the same time as the next rising edge is received, a timer is started. This timer is pre-configured to PWM output mode with a duty cycle of 50%. The output period is set to 1PPS according to the crystal oscillator frequency of the programmable control module 3, which is T1. Since there is an error between the external crystal oscillator and the GNSS clock, there is an error between T2 and T1, which is Δt. Each rising edge of GNSS-PPS will update T2, and each update of T2 will generate Δt = T2 - T1.

[0108] To further improve accuracy, an array err

[100] is set up to record Δt in a loop and calculate its average value Δt0. The average value Δt0 is calculated using the following formula:

[0109] Δt0=(err[0]+err[1]+…err

[99] ) / 100;

[0110] Therefore, the final output of the reference 1PPS in this system is T1+Δt0.

[0111] Specifically, after calculating the deviation between the two PPS signals, the programmable control module 3 is used to simulate and generate the GPRMC signal TOD.

[0112] Specifically, the GPRMC signal is a standard navigation data format that includes information such as time, date, position, and speed, and is a universal GNSS timing protocol. To ensure the system can still publish a reference time even in the event of GNSS loss, this invention uses an FPGA to simulate and generate the GPRMC signal TOD (Time of Day). When GNSS is locked, the received GPRMC signal is directly used as the TOD; after GNSS loss, the TOD continues to be output using a self-generated 1PPS timing mechanism.

[0113] Specifically, the methods for generating TOD include:

[0114] First, the format and protocol of the GPRMC signal are determined, including the start and end symbols of the data packets, and the meaning and order of each field. Then, programmable control module 3 is used, for example, by writing corresponding Verilog code using the Vivado development tool, to generate data packets conforming to the GPRMC format. In the code, the start and end symbols are generated first, and then the data for each field, including time, date, location, and velocity, is generated as needed. The generated data packets are sent to the sensor device through the output serial port of programmable control module 3. The time-related data is accumulated based on the reference PPS of programmable control module 3, thus maintaining TOD output even when external GNSS is unavailable.

[0115] Specifically, as shown above, the output PPS signal period is calibrated by GNSS module 1, with a calibration value of Δt0. With GNSS module 1 present, this value is continuously updated; the longer the time interval, the closer Δt0 is to the true value, and the more stable it becomes. Without GNSS module 1, the output time is updated using the Δt0 obtained from the last calculation. Figure 7 The diagram illustrates the switching of the clock reference before and after the loss of GNSS module 1. Specifically, since GNSS can only be received outdoors, the PPS and the corresponding GPRMC are only available outdoors. Once indoors, they cannot be received. When GNSS is received, the internal time is always aligned with the external GNSS time, and its reference is essentially a satellite clock. Once GNSS is lost, the time can only be maintained by the internal time, which is based on a crystal oscillator.

[0116] This invention designs a dual-redundant time information switching mechanism. From the moment the programmable control module 3 receives the GPRMC sequence from the GNSS module 1, a set of simulated GPRMC sequences, called TOD, is also generated inside the FPGA using a high-precision crystal oscillator. In addition, after receiving the PPS signal, a set of simulated PPS signals is also generated using a timer. These two sets of signals are aligned with the GNSS signal at each clock rising edge. When it is determined through satellite search data that there is no signal from the GNSS module 1, the output is switched to simulated TOD and PPS based on the internal clock.

[0117] Using the method described above, the two PPS signals were tested. In practical applications, the phase difference between the PPS signals and the waveforms obtained by GNSS module 1 was 1.656 μs. This deviation is within a reasonable range and fully meets the requirements for sensor synchronization.

[0118] In the GNSS Module 1 operating environment, the clock source generated by the internal crystal oscillator outputs relevant information. After the GNSS Module 1 signal is reacquired, since the accuracy of the internal crystal oscillator is difficult to match that of the high-precision atomic clock of the GNSS Module 1, the waveforms of the two signals need to be realigned. Due to error accumulation, clock errors are unavoidable after long-term operation in the GNSS Module 1 operating environment. Aligning it with the GNSS Module 1 waveform once will directly eliminate the error, but the existence of the error will give the clock of the entire system a time gap.

[0119] To address the aforementioned shortcomings, this invention proposes a smooth alignment method that can eliminate errors as quickly as possible while preventing large fluctuations in the data.

[0120] Specifically, the above-mentioned smoothing alignment methods that eliminate errors and prevent large fluctuations in data include:

[0121] Design one or more variables to continuously obtain the magnitude of the error, so that the error of each alignment is within a certain range. The number of alignments required can be automatically calculated until the error variable is 0, thus achieving deviation elimination.

[0122] As described above, the error is Δt0. In the absence of GNSS input, the system continuously uses the last updated Δt0. Once GNSS is reacquired, Δt0 will be updated and denoted as Δt. n After a long period of accumulation, Δt n There will be a large deviation from Δt0 if Δt is used directly. n Filling the array err

[100] to update the calculation of Δt0 will cause large fluctuations in the output PPS waveform and TOD time. Therefore, this invention adopts a smoothing correction method, that is, the system sets if Δt n If -Δt0>100ms, the deviation is eliminated in multiple steps, and the formula (Δt) is used to calculate the deviation. n -Δt0100ms)+1 calculates the number of times the error is eliminated.

[0123] Specifically, the purpose of the above smoothing process is that if the GNSS loss time is long, the internal crystal oscillator maintenance time and the GNSS reference time may deviate more and more. Through the above smoothing process, the above deviation is adjusted and reduced each time until it is fully aligned after a period of time.

[0124] For example, since 1 second of the internal crystal oscillator is actually 0.999 seconds, it deviates from the standard 1 second by 0.001 seconds each time. Starting from 11:00:00 on a certain day in a certain region, after 1000 seconds of standard time have passed, theoretically it should be 11:16:40 on the same day in the same region. However, because the internal crystal oscillator jumps quickly, it has already jumped 1001 times, and the internal time is recorded as 11:16:41 on the same day in the same region. If a GNSS signal is suddenly received at this time, directly aligning the internal time will directly change it from 41 seconds back to 40 seconds, which will cause a time synchronization defect. Therefore, through the above smoothing process, the time deviation is gradually corrected each time, and then completely adjusted back after a period of time.

[0125] Specifically, in the above method of synchronizing indoor and outdoor data, the algorithm model is called to calculate the deviation and smooth the signal that needs to be aligned, so that the indoor and outdoor data are synchronized. After verifying the clock synchronization in step f), g) driving the sensor is required: the data stream with accurate clock information is sent to each sensor in the custom format TOD and PPS to realize the acquisition of data with timestamp information.

[0126] Specifically, the acquisition of data with timestamp information mainly includes external sensor synchronization, which mainly includes time synchronization between the inertial measurement module 2 (IMU) and the GNSS module 1, as well as time synchronization between other sensors and the GNSS module 1.

[0127] Specifically, such as Figure 8 The diagram shown illustrates the time synchronization between the inertial measurement unit (IMU) and the GNSS module in a seamless indoor-outdoor data synchronization method according to an embodiment of the present invention. The time synchronization between the inertial measurement module 2 (IMU) and the GNSS module 1 includes:

[0128] Since the sampling frequency of the inertial measurement module 2 (IMU) is much higher than 1Hz, it is necessary to determine the sampling time of the inertial measurement module 2 (IMU) under the reference time generated by this invention. The local clock count values ​​of the start and end times corresponding to 1PPS generated by the system are T1 and T3, respectively. The local clock count value of the sampling time of the inertial measurement module 2 (IMU) is T2. The TOD time t2 corresponding to T1 is t1. Then, the TOD time t2 of the sampling time of the inertial measurement module 2 (IMU) can be calculated according to the following formula:

[0129] t2=t1+(T2-T1)+Δt0×(T2-T1) / (T3-T1).

[0130] Other sensors that synchronize with GNSS module 1 include:

[0131] like Figure 9The diagram illustrates the process of synchronizing other sensors with GNSS time in a seamless indoor / outdoor data synchronization method provided by an embodiment of the present invention. For external devices, sampling can be triggered using the PPS reference signal generated by the present invention, and the corresponding TOD can be used as the sampling timestamp. Depending on the sampling frequency of the external sensors, 1PPS can be divided into the required frequencies through frequency division. Simultaneously, the time reference of the collected data can be unified by directly connecting the TOD to the sensor or writing it into the sensor data packet via a host computer, depending on the device requirements.

[0132] In summary, this invention addresses the need for an accurate, safe, and economical time synchronization system to fuse multi-source data in unmanned systems. Existing technologies, to address the aforementioned problems in unmanned systems, most commonly used embedded time synchronization techniques employ two methods: GNSS-based time and embedded board-based time. The GNSS-based time method utilizes the 1PPS signal output by GNSS and GPRMC time information to provide a time reference for external devices. However, due to its reliance on GNSS, time synchronization cannot be achieved in environments where GNSS is denied, such as indoors. The embedded board-based time method uses its own timing generation module to generate stable pulse trigger signals based on its own clock and crystal oscillator for triggering external sensors. The data sampling timestamp is obtained through a host computer time system. The accuracy of this timescale maintenance depends on the crystal oscillator quality of the embedded board, thus it cannot maintain high-precision absolute time synchronization for extended periods. This results in inaccurate time synchronization of multi-sensor data in unmanned systems under indoor and outdoor environments. To address this issue, this application utilizes a structure consisting of a GNSS module 1, an inertial measurement module 2, and a programmable control module 3. It determines indoor and outdoor time synchronization by calculating the alignment of two PPS signals. The result is accurate and highly precise, enabling accurate time synchronization of multi-sensor data from unmanned systems in both indoor and outdoor environments. This improves the accuracy of hardware synchronization, solves the problem of discontinuous GNSS time information in complex indoor and outdoor environments, and, by employing an FPGA chip, results in a smaller overall device size, lower power consumption, and lower weight. It can independently generate a time reference without relying on network communication, meeting the needs of small unmanned systems.

[0133] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Additionally, the terms "front," "back," "left," "right," "upper," and "lower" in this document refer to the placement shown in the accompanying drawings.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A seamless indoor-outdoor data synchronization device, characterized in that, include: The GNSS module is used to receive the 1PPS signal and GPRMC information generated by an external atomic clock; An inertial measurement module is used to fuse information generated by the GNSS module to generate position, attitude, and velocity information. The programmable control module is connected to the GNSS module and the inertial measurement module via a serial port. It receives the 1PPS signal and GPRMC information from the GNSS module, as well as the position, attitude, and velocity information generated by the inertial measurement module. It aligns the square wave generated by the local clock with the square wave of the 1PPS signal from the GNSS module, and divides the square wave according to a preset frequency. It continuously and stably outputs the corresponding frequency pulse wave signal and time information through the serial port, and calibrates the clock signal through an external calibration factor. The programmable control module also has an algorithm model. When synchronizing indoor and outdoor data, the algorithm model is called to calculate the deviation and smooth the signal that needs to be aligned, so as to synchronize the indoor and outdoor data. The device synchronizes data in the following manner: The local time is calibrated by receiving external time information from the GNSS module, so that the 1PPS time recorded by the GNSS module in the programmable control module is aligned with the timing triggered by the programmable control module based on the rising edge of the GNSS module's PPS. Calculate the deviation between the two PPS signals, and use the programmable control module to simulate and generate the GPRMC signal TOD. The deviation is corrected to synchronize the aligned time with global standard time, so that the indoor and outdoor times are the standard time truncation; The deviation between the two PPS signals is calculated using the following formula: ; in: This represents the difference between two PPS signals. This indicates the 1PPS time received by the programmable controller from the GNSS module. This indicates that the programmable control module triggers the timing based on the rising edge of the PPS of the GNSS module; Meanwhile, to improve the accuracy of the calculated deviation between the two PPS signals, an array needs to be set up during the calculation process to cyclically record the difference between the two PPS signals. And solve for its average value. ; Among them, the average value It is obtained by calculation using the following formula: ; in: This indicates the calculation of the difference between two PPS signals. The array set at the time; Correcting the deviation to synchronize the aligned time with global standard time, so that the indoor and outdoor times are the standard time, includes: using a smoothing method to realign the waveforms corresponding to the times of the two PPS to eliminate the time deviation between the two PPS. The smoothing method includes: In the process of calculating the deviation between two PPS signals, one or more variables are set, and the magnitude of the deviation is continuously calculated to align the time between the two PPS signals. The number of alignment attempts is automatically calculated until the value of the variable used to calculate the deviation is 0, at which point the deviation is eliminated. The following formula is used to calculate the number of times the deviation needs to be eliminated during the deviation elimination process: ; in: Indicates after GNSS recapture The updated value.

2. The seamless indoor-outdoor data synchronization device according to claim 1, characterized in that, The programmable control module includes an FPGA chip.

3. The seamless indoor-outdoor data synchronization device according to claim 1, characterized in that, The inertial measurement module includes an IMU.

4. The seamless indoor-outdoor data synchronization device according to any one of claims 1 or 3, characterized in that, The inertial measurement module includes: An inertial measurement unit (IMU) is connected to an external first power module, which supplies power to the IMU. The IMU is used to measure acceleration and angular velocity during motion. A connector, wherein the connector is provided with a plug-in interface and an external interface; The integrated navigation calculation chip is connected to the connector through the connector interface and connected to the programmable control module through the external interface. The integrated navigation calculation chip is used to fuse the measurement data generated by the inertial measurement unit and the positioning information generated by the GNSS module to generate position, attitude and velocity information. A mounting base is fixedly connected to the inertial measurement unit and the integrated navigation calculation chip, and is used to fix the inertial measurement unit and the integrated navigation calculation chip.

5. The seamless indoor-outdoor data synchronization device according to claim 1, characterized in that, The GNSS module includes: The second power module is used to supply power. Antenna, the antenna being used to receive the 1PPS signal and GPRMC information generated by the external atomic clock; A GNSS chip, which is connected to the second power module and the antenna, is used to locate the position of the antenna receiving the 1PPS signal and GPRMC information generated by the atomic clock.

6. The seamless indoor-outdoor data synchronization device according to claim 1, characterized in that, The calibration factors include frequency offset parameters and phase deviation parameters, and these parameters can be defined and set in the programmable control module for data reception.

7. A method for seamless indoor and outdoor data synchronization using the seamless indoor and outdoor data synchronization device according to any one of claims 1-6, characterized in that, include: The local time is calibrated by receiving external time information from the GNSS module, so that the 1PPS time recorded by the GNSS module in the programmable control module is aligned with the timing triggered by the programmable control module based on the rising edge of the GNSS module's PPS. Calculate the deviation between the two PPS signals, and use the programmable control module to simulate and generate the GPRMC signal TOD. The deviation is corrected to synchronize the aligned time with global standard time, so that the indoor and outdoor times are the standard time truncation; The deviation between the two PPS signals is calculated using the following formula: ; in: This represents the difference between two PPS signals. This indicates the 1PPS time received by the programmable controller from the GNSS module. This indicates that the programmable control module triggers the timing based on the rising edge of the PPS of the GNSS module; Meanwhile, to improve the accuracy of the calculated deviation between the two PPS signals, an array needs to be set up during the calculation process to cyclically record the difference between the two PPS signals. And solve for its average value. ; Among them, the average value It is obtained by calculation using the following formula: ; in: This indicates the calculation of the difference between two PPS signals. The array set at the time; Correcting the deviation to synchronize the aligned time with global standard time, so that the indoor and outdoor times are the standard time, includes: using a smoothing method to realign the waveforms corresponding to the times of the two PPS to eliminate the time deviation between the two PPS. The smoothing method includes: In the process of calculating the deviation between two PPS signals, one or more variables are set, and the magnitude of the deviation is continuously calculated to align the time between the two PPS signals. The number of alignment attempts is automatically calculated until the value of the variable used to calculate the deviation is 0, at which point the deviation is eliminated. The following formula is used to calculate the number of times the deviation needs to be eliminated during the deviation elimination process: ; in: Indicates after GNSS recapture The updated value.

8. The seamless indoor-outdoor data synchronization method according to claim 7, characterized in that, The programmable control module is used to simulate and generate the GPRMC signal TOD, which includes: Determine the format and protocol of the GPRMC signal, and use a programmable control module to write the corresponding protocol code to generate data packets that conform to the GPRMC format; In the code, start and end symbols are generated, data for each field is generated as needed, and the generated data packet is sent to the sensor device through the output serial port of the programmable control module. When the GNSS module is locked, the received GPRMC is directly used as the TOD. After the GNSS module is unlocked, it continues to output the TOD through the 1PPS timing generated by itself.

Citation Information

Patent Citations

  • Clock synchronization method of distributed control system

    CN103995471A

  • Universal GPS indoor and outdoor positioning system and method

    CN104898129A