Indoor and outdoor seamless data synchronization device and method
By designing a data synchronization device including GNSS module, inertial measurement module and programmable control module in an unmanned system, the problem of time synchronization in indoor GNSS denial environments is solved, and accurate time synchronization of multi-sensor data of unmanned systems is realized. It has the characteristics of high precision and low power consumption, and is suitable for small unmanned systems.
Patent Information
- Application Number
- CN202411574174.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The prior art cannot realize time synchronization of unmanned system multi-sensors in indoor GNSS denial environments, and the existing time synchronization methods are insufficient in accuracy and cost, making it difficult to be applicable to miniaturized mobile robot equipment.
A seamless data synchronization device for indoor and outdoor is designed, including a GNSS module, an inertial measurement module and a programmable control module. The GNSS module receives the 1PPS signal and GPRMC information generated by the external atomic clock. The inertial measurement module integrates the positioning information, generates position, attitude and speed information, and combines the programmable control module to calibrate and calculate the clock signal to achieve accurate time synchronization of indoor and outdoor data.
It realizes accurate time synchronization of multi-sensor data of unmanned systems in indoor and outdoor environments, and has the characteristics of lightweight, high precision, low power consumption, etc. It can provide a time reference of microsecond accuracy in complex environments. It is suitable for small unmanned systems such as UGV and UAV.
Smart Images

Figure CN119555059A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a device and method for seamless indoor and outdoor data synchronization. Background Art
[0002] In the fields of drones, autonomous driving, robots, etc., using heterogeneous sensors to obtain environmental information and perform fusion processing can improve the redundancy of information and form a multi-dimensional mapping expression of the environment and its own state of the unmanned system, thereby improving the accuracy and reliability of perception. It has very important significance and value in theory and engineering practice. The purpose of time synchronization is to provide a unified time base for heterogeneous sensors with different frequencies to ensure that the collected data can truly represent the environmental information under the same time frame. The maintenance of the time base mainly includes two aspects: one is the maintenance of the time measurement scale; because the clock sources of each sensor have different clock drifts, that is, there is often a difference in the 1s of each clock, even if the timestamps of each sensor are aligned at the initial time, after running for a period of time, the results of the previous alignment will still deviate. The second is the unification of sampling time; the sampling frequencies of each sensor are not consistent. Even if the initial sampling time of each sensor is accurately aligned, the subsequent sampling will still have deviations. Therefore, the unification of sampling time is generally achieved by marking a unified time tag on the data of different sensors.
[0003] In response to the above multi-sensor time synchronization problem, the existing lightweight and low-power time synchronization solutions are mainly divided into two categories:
[0004] The first category is based on GNSS, and time synchronization is achieved through the 1PPS signal and GPRMC time information output by GNSS. For example, the STM32 microcontroller is used to simultaneously receive the "sampling completed" pulse signal of the IMU and the 1PPS signal of the GNSS receiver, each triggering an interrupt and recording the current local crystal oscillator time. The offset of the local crystal oscillator time relative to the GNSS absolute time can be calculated using the local crystal oscillator time corresponding to the 1PPS signal and the GPRMC time of the GNSS; then the offset is compensated to the local crystal oscillator time corresponding to the IMU "sampling completed" signal, and the local time scale of the IMU can be converted into the GNSS absolute time scale, realizing the time synchronization between the GNSS and the IMU. Another example is to use FPGA to receive the 1PPS signal of the GNSS and generate a high-frequency synchronization pulse sequence based on the rising edge of the PPS and send it to the IMU to trigger the IMU to synchronously collect data, and generate a TOV pulse marked with the timestamp of the high-frequency synchronization pulse sequence to achieve the time synchronization between the GNSS and the IMU.
[0005] Although the above strategy relying on GNSS timing has high accuracy, its usage scenarios are limited and time synchronization cannot be achieved in GNSS-denied environments such as indoors.
[0006] The second type is to generate a stable pulse trigger signal for triggering external sensors through a timing self-generation module, and the data sampling timestamp is soft-time synchronized through the host computer. For example, the field synchronization signal of the infrared camera is used as the trigger source of the entire system, and the field synchronization signal is converted into a trigger pulse signal acceptable to other subsystems through a frequency conversion module to synchronously trigger each sensor to collect data, and the system timestamp is recorded in the host computer to achieve timing synchronization of multi-source data. For another example, the sampling timing generation module is used to generate three strict trigger signals for base period, inertial data acquisition, and visual data acquisition. The two data acquisition signals control inertial and visual data acquisition respectively. When the timing encoding module receives a base period signal, it increments the counter at integer intervals; when the inertial and visual data acquisition trigger signals are received, the corresponding counter is synchronized to the counter of the base period signal.
[0007] The above-mentioned self-generation method of time series has poorer accuracy than the GNSS-based method in terms of time scale maintenance and timestamp counting.
[0008] Since unmanned systems require an accurate, secure and economical time synchronization system to achieve the fusion of multi-source data. In order to solve the above-mentioned problems in the prior art, the most commonly used in large-scale time synchronization technology are NTP (Network Time Protocol) and PTP (Precision Time Protocol) servers. NTP is a software protocol that distributes time information through the Internet to achieve time synchronization of each device. NTP relies on network communication between the host and the clock server. In the complex environment of unmanned system applications, communication conditions are difficult to guarantee. Therefore, it is not applicable to time synchronization between sensors in unmanned systems. Similarly, PTP is a hardware protocol that can achieve nanosecond time synchronization through hardware timestamps and precise clock synchronization algorithms. However, this method has high deployment and maintenance costs, requires special hardware support, and has high requirements for networks and equipment. It is not suitable for miniaturized mobile robot devices such as UGV and UAV. Summary of the invention
[0009] In order to solve some or all of the technical problems existing in the above-mentioned prior art, the present invention provides a seamless indoor and outdoor data synchronization device and method, which can realize the precise 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 an indoor and outdoor seamless data synchronization device, comprising:
[0012] A GNSS module, wherein the GNSS module is used to receive a 1PPS signal and GPRMC information generated by an external atomic clock;
[0013] An inertial measurement module, which is used to fuse the positioning information generated by the GNSS module to generate position, attitude and speed information;
[0014] A 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 GPRMC information of the GNSS module and the position, attitude and speed information generated by the inertial measurement module, and aligning the square wave generated by the local clock with the 1PPS signal square wave of the GNSS module, and dividing the square wave according to a preset frequency, and continuously and stably outputting a pulse wave signal and time information of a corresponding frequency through the serial port, and calibrating the clock signal through an external calibration factor. At the same time, an algorithm model is set in the programmable control module. When synchronizing indoor and outdoor data, the algorithm model is called to perform deviation calculation and smoothing processing on the signal to be aligned, so as to synchronize indoor and outdoor data.
[0015] Furthermore, in the above-mentioned indoor and outdoor seamless data synchronization device, the programmable control module includes an FPGA chip.
[0016] Furthermore, in the above-mentioned indoor and outdoor seamless data synchronization device, the inertial measurement module includes an IMU.
[0017] Furthermore, in the above-mentioned indoor and outdoor seamless data synchronization device, the inertial measurement module includes:
[0018] An inertial measurement unit, the inertial measurement unit is connected to an external first power module so that the first power module supplies power to the inertial measurement unit, and the inertial measurement unit is used to measure acceleration and angular velocity in motion;
[0019] A plug connector, on which a plug interface and an external interface are provided;
[0020] An integrated navigation solution chip, wherein the integrated navigation solution chip is connected to the connector via the plug interface, and is connected to the programmable control module via the external interface, and the integrated navigation solution 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 speed information;
[0021] A fixing seat, wherein the fixing seat is fixedly connected to the inertial measurement unit and the integrated navigation solution chip, and is used to fix the inertial measurement unit and the integrated navigation solution chip.
[0022] Furthermore, in the above-mentioned indoor and outdoor seamless data synchronization device, the GNSS module includes:
[0023] A second power supply module, wherein the second power supply module is used for supplying power;
[0024] An antenna, the antenna being used to receive a 1PPS signal and GPRMC information generated by the external atomic clock;
[0025] A GNSS chip is connected to the second power module and the antenna, and is used to locate the position where the antenna receives the 1PPS signal and GPRMC information generated by the atomic clock.
[0026] Furthermore, in the above-mentioned indoor and outdoor seamless 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 a programmable control module for data reception.
[0027] In a second aspect, the present invention further provides an indoor and outdoor seamless data synchronization method using the indoor and outdoor seamless data synchronization device, comprising:
[0028] The local time is calibrated by the time information received from the external input by the GNSS module, so that the 1PPS time recorded by the programmable control module for the GNSS module is aligned with the timing time triggered by the rising edge of the PPS of the GNSS module in the programmable control module;
[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 so that the aligned time is synchronized with the global standard time, so that the indoor and outdoor times are the standard time.
[0031] Furthermore, in the above-mentioned indoor and outdoor seamless data synchronization method, the deviation between the two PPS signals is calculated by the following formula:
[0032] Δt = T2 - T1;
[0033] Where: Δt represents the difference between two PPS signals, T2 represents the 1PPS time of the GNSS module received by the programmable control module, and T1 represents the timing triggered by the programmable control module according to the rising edge of the PPS of the GNSS module;
[0034] At the same time, in order to make the calculated deviation between the two PPS signals more accurate, an array needs to be set during the calculation process to cyclically record the difference Δt between the two PPS signals and solve their average value Δt0;
[0035] The average value Δt0 is calculated by the following formula:
[0036] Δt0=(err[0]+err[1]+…err
[99] ) / 100;
[0037] Wherein: 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 above-mentioned indoor and outdoor seamless data synchronization method, using 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 the programmable control module to write the corresponding protocol code to generate data packets that conform to the GPRMC format;
[0040] In the code, the start character and the end character are generated, the data of 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 TOD. After the GNSS module loses lock, it continues to output TOD through the 1PPS timing generated by itself.
[0042] Furthermore, in the above-mentioned indoor and outdoor seamless data synchronization method, the deviation is corrected so that the aligned time is synchronized with the global standard time, so that the indoor and outdoor time is the standard time, including: using a smoothing method to realign the waveforms corresponding to the time of the two PPSs so that the deviation of the time of the two PPSs is eliminated;
[0043] The smoothing method includes:
[0044] In the process of calculating the deviation between the two PPS signals, one or more variables are set, and the magnitude of the deviation is continuously calculated so that the time between the two PPS signals is aligned, and the number of alignments is automatically calculated until the variable value of the deviation calculation is 0, so that the deviation can be eliminated. In the process of deviation elimination, the following formula is used for calculation:
[0045] t2=t1+(T2-T1)+Δt0×(T2-T1) / (T3-T1);
[0046] Among them: T1 represents the starting value corresponding to the 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 end time, t1 and t2 represent the variables set in the process of calculating the deviation between the two PPS signals, among which 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 the present invention are as follows:
[0048] The indoor and outdoor seamless data synchronization device of the present invention comprises a GNSS module, an inertial measurement module and a programmable control module. The programmable control module is used to align a square wave signal generated according to a local clock with a 1PPS signal generated by a GNSS module, and frequency division is performed according to a set frequency. A pulse wave signal and time information of a corresponding frequency are continuously and stably outputted through a serial port. The clock signal is calibrated by accessing an external calibration factor so that the aligned time is synchronized with the global standard time, so that the indoor and outdoor time is the standard time cutoff. An algorithm model is set in the programmable control module. When synchronizing indoor and outdoor data, the algorithm model is called to perform deviation calculation and smoothing processing on the signal to be aligned, so that the method for synchronizing indoor and outdoor data has an accurate result. The method for judging whether the indoor and outdoor time is synchronized based on whether the two PPS signals are aligned has high judgment accuracy, can realize accurate time synchronization of multi-sensor data of unmanned systems in indoor and outdoor environments, has the characteristics of lightweight, high precision, low power consumption, etc., can continuously and stably provide a time reference with microsecond accuracy in complex indoor and outdoor environments, and can be applicable to small unmanned systems such as UGV and UAV. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The drawings described herein are used to provide a further understanding of the embodiments of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0050] Figure 1 It is a structural schematic diagram of an indoor and outdoor seamless data synchronization device according to an embodiment of the present invention;
[0051] Figure 2 A schematic diagram of the principle of an indoor and outdoor seamless data synchronization device provided by an embodiment of the present invention;
[0052] Figure 3 A schematic diagram of the structure of an inertial measurement module in a seamless indoor and outdoor data synchronization device provided by an embodiment of the present invention;
[0053] Figure 4 A schematic diagram of the structure of a GNSS module in a seamless indoor and outdoor data synchronization device provided by an embodiment of the present invention;
[0054] Figure 5 A schematic diagram of a flow chart of calling an algorithm model to perform deviation calculation and smoothing processing on signals to be aligned in a method for seamless indoor and outdoor data synchronization provided by an embodiment of the present invention;
[0055] Figure 6A schematic diagram of the time alignment between the 1PPS output by the internal clock of the programmable control module and the 1PPS output by the GNSS module in the indoor and outdoor seamless data synchronization method provided by one embodiment of the present invention;
[0056] Figure 7 A schematic diagram of a flow chart of signal switching before and after GNSS loss in a method for seamless indoor and outdoor data synchronization provided by an embodiment of the present invention;
[0057] Figure 8 A schematic diagram of time synchronization between an inertial measurement unit and a GNSS module in a method for seamless indoor and outdoor data synchronization provided by an embodiment of the present invention;
[0058] Fig. 9 A schematic diagram of a process of synchronizing other sensors with GNSS time in a method for seamless indoor and outdoor data synchronization provided by an embodiment of the present invention;
[0059] Fig.10 A flow chart of a method for seamless indoor and outdoor data synchronization provided by an embodiment of the present invention;
[0060] Description of reference numerals:
[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 solution chip; 204, fixing seat; 205, first power supply module;
[0065] 3. Programmable control module. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0067] The technical solution provided by the embodiments of the present invention is described in detail below with reference to the accompanying drawings.
[0068] First, a brief explanation of the technical terms involved in this application is given.
[0069] UART (Universal Asynchronous Receiver / Transmitter): stands for Universal Asynchronous Receiver / Transmitter, which is a universal serial data bus used for asynchronous communication. This bus has the function of bidirectional communication and can realize full-duplex transmission and reception.
[0070] 1PPS (One Pulse Per Second) signal is an accurate time signal in the GPS module, which generates a pulse signal per second and is used for time synchronization and precise timing. It has the characteristics of high stability and low error.
[0071] TOD (Time Of Day) is a time synchronization technology based on the computer system clock. It synchronizes the computer system clock to the global standard time.
[0072] GNSS (Global Navigation Satellite System): Global Navigation Satellite System, also known as Global Satellite Navigation System, is an air-based radio navigation and positioning system that can provide users with all-weather 3D coordinates, speed 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 further developed based on programmable devices such as PAL (Programmable Array Logic) and GAL (General Array Logic).
[0074] RTCM (Radio Technical Commission for Maritime Services) represents a set of standard protocols developed for the application of radio technology in maritime services.
[0075] GPRMC (Recommended Minimum Specific GNSS Data), GPRMC message contains the location, speed, heading and other information of the positioning device, and is the most basic and commonly used format of GPS positioning data. This message is usually sent periodically by the positioning device and is widely used in many applications to obtain real-time location information. When parsing the GPRMC message, you need to understand its specific format and meaning in order to effectively extract the positioning information.
[0076] As attached Figure 1-10As shown, the purpose of the present invention is to combine the application of miniaturized unmanned systems, aiming at the problem of indoor and outdoor integrated time synchronization, design and develop lightweight, high-precision, low-power time synchronization equipment and algorithms, and realize accurate time synchronization of multi-sensor data of unmanned systems in indoor and outdoor environments. In order to solve the technical problems existing in the prior art and achieve the above-mentioned purpose, an embodiment of the present 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, such as Figure 1 As shown, where:
[0077] The GNSS module 1 is used to receive the 1PPS signal and GPRMC information generated by an external atomic clock; the inertial measurement module 2 is used to fuse the positioning information generated by the GNSS module 1 to generate position, attitude and speed information; the programmable control module 3 is connected to the GNSS module 1 and the inertial measurement module 2 through a serial port, and is used to receive the 1PPS signal and GPRMC information of the GNSS module 1 and the position, attitude and speed information generated by the inertial measurement module 2, and align the square wave generated by the local clock with the 1PPS signal square wave of the GNSS module 1, and divide the square wave according to the preset frequency, and continuously and stably output the pulse wave signal and time information of the corresponding frequency through the serial port, and calibrate the clock signal through an external calibration factor. At the same time, an algorithm model is set in the programmable control module 3. 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 that the indoor and outdoor data are synchronized.
[0078] The following combination Figure 2 The principle of the indoor and outdoor seamless data synchronization device of the present invention is specifically described as follows:
[0079] The programmable control module 3 receives the PPS signal data transmitted by the 6pin or 3pin interface converted by the RS232 converter, the sampling pulse data transmitted by the 3pin interface converted by the power conversion module, the data transmitted by the 3pin interface received and input by the inertial measurement module 2 through the serial port, and the 1PPS signal and GPRMC information transmitted by the 6pin interface output by the GNSS module 1 through the serial port and received by the RS232 protocol. Then 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, continuously and stably outputs the pulse wave signal and time information of the corresponding frequency through the serial port, and calibrates the clock signal by accessing the external calibration factor, so that the aligned time is synchronized with the global standard time, so that the indoor and outdoor time is the standard time. The method of judging whether the indoor and outdoor time is synchronized by calculating whether the two PPS signals are aligned has accurate results with high precision. It can realize the precise time synchronization of multi-sensor data of unmanned systems in indoor and outdoor environments. It has the characteristics of lightweight, high precision and low power consumption. It can continuously and stably provide a time reference with microsecond precision in complex indoor and outdoor environments. It can be applied to small unmanned systems such as UGV and UAV.
[0080] Specifically, by using high-precision frequency division technology, under the calibration of external PPS, the analog PPS signal and TOD information can be continuously and accurately output, which contains accurate time information. After re-acquiring the GNSS module 1 information, the internal clock can be automatically calibrated using the GNSS module 1 information, solving the problem of discontinuous time information of the GNSS module 1 in complex indoor and outdoor environments.
[0081] Typically, the frequency division in the above-mentioned high-precision frequency division technology is to convert a 1 Hz square wave into a higher frequency, such as 10 Hz or 50 Hz.
[0082] Specifically, how the present invention realizes that the analog PPS signal and TOD information can be continuously and accurately output under the calibration of the external PPS is further described below:
[0083] The internal crystal oscillator can generate a 1Hz square wave, but its frequency stability is not high, that is, the interval of 1 second is not strictly 1s, while the 1Hz PPS received externally through GNSS is generated by the 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 can only ensure that the length of each second is stable, but it is not known what specific time each PPS rising edge corresponds to, for example, a certain rising edge should correspond to a certain area time with accuracy to seconds. Since the external PPS and GPRMC are bundled together, the received GPRMC contains time tag information, so the time tag of the external PPS can be known. By aligning the square wave with the PPS, the corresponding time tag of the square wave can be obtained, and then the time tag can be encoded as TOD information according to the GPRMC protocol format.
[0084] Preferably, the above-mentioned programmable control module 3 is an FPGA chip; compared with the traditional single-chip microcomputer with a relatively low clock frequency and a relatively large error, the present invention uses a high-frequency FPGA chip with a main frequency of up to 400MHz. The generated clock signal is more accurate and easy to transplant. It does not depend on the wiring delay of each logic device, which is conducive to the transplantation of the device.
[0085] Preferably, the above-mentioned inertial measurement module 2 is an IMU.
[0086] Specifically, in the indoor and 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, an integrated navigation solution chip 203 and a fixing seat 204, wherein:
[0087] The inertial measurement unit 201 is connected to an external first power module 205 so that the first power module 205 supplies power to the inertial measurement unit 201. The inertial measurement unit 201 is used to locate the position of the 1PPS signal and the GPRMC information generated by the atomic clock. A plug interface and an external interface are provided on the connector 202. The integrated navigation solution chip 203 is connected to the connector 202 through the plug interface, and the integrated navigation solution chip 203 is connected to the programmable control module 3 through the external interface. The integrated navigation solution chip 203 is used to solve the positioning data generated by the inertial measurement unit 201. The fixing seat 204 is fixedly connected to the inertial measurement unit 201 and the integrated navigation solution chip 203, and is used to fix the inertial measurement unit 201 and the integrated navigation solution chip 203.
[0088] Specifically, in the indoor and outdoor seamless 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 for power supply; the antenna 102 is used for receiving the 1PPS signal and GPRMC information generated by an external atomic clock; the GNSS chip 103 is connected to the second power module 101 and the antenna 102, and is used for locating the position where the antenna 102 receives the 1PPS signal and GPRMC information generated by the atomic clock.
[0090] Preferably, the above calibration factors 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 for data reception in the programmable control module 3 .
[0091] Specifically, the algorithm models set in the programmable control module 3 of the present invention include Cristian algorithm, Berkeley algorithm and Averaging algorithm, etc., which are mainly used to realize the calculation of the deviation between two or more PPSs, the maintenance count and smoothing processing of the deviation between two or more PPSs, etc., and when the deviation between the two PPSs is 0, the waveforms corresponding to the time of the two PPSs are realigned, and the aligned local time information is recompiled according to the standard protocol format.
[0092] Specifically, when synchronizing indoor and outdoor data, the algorithm model is called to perform deviation calculation and smoothing processing on the signals to be aligned, so that the method for synchronizing indoor and outdoor data is as follows: Figure 5 As shown, the following steps are included:
[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) Receiving a clock signal: using the input interface of the programmable control module 3 to receive a reference clock signal, and inputting it into the programmable control module 3 .
[0095] c) Extract clock information: parse the time information from the received clock signal to obtain the frequency, phase and other parameters of the 1PPS signal.
[0096] d) Calibrate the local clock: adjust the frequency of the square wave generated by the local clock according to the external time reference, and realize the calibration and synchronization of the square wave output based on the local clock inside the programmable control module 3.
[0097] e) Realize clock synchronization: inside the programmable control module 3, calculate the error between the local clock and the clock of the GNSS module 1, and make up the error artificially.
[0098] f) Verify clock synchronization: Verify and test 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) Driving sensors: Sending data streams with precise clock information to each sensor in the custom formats TOD and PPS to collect data with timestamp information.
[0100] Specifically, the above-mentioned UTC (Universal Time Coordinated) represents Coordinated Universal Time, also known as Universal Time, World Standard Time, and International Coordinated Time.
[0101] In a second aspect, the present invention also provides an indoor and outdoor seamless data synchronization method using the indoor and outdoor seamless data synchronization device, such as Fig.10 As shown, including:
[0102] The local time is calibrated by the time information of the external input received by the GNSS module 1, so that the 1PPS time recorded by the GNSS module 1 in the programmable control module 3 is aligned with the timing time triggered by the rising edge of the GNSS module 1PPS; the deviation between the two PPS signals is calculated, and the programmable control module 3 is used to simulate the generation of the GPRMC signal TOD; the deviation is corrected to synchronize the aligned time with the global standard time, so that the indoor and outdoor time is the standard time.
[0103] Specifically, since the core function of the programmable control module 3 in the present invention is to realize the continuous output of seamless time synchronization signals indoors and outdoors, the programmable control module of the present invention autonomously generates a stable time reference internally and calibrates the local time through the time information of the external GNSS module 1.
[0104] Specifically, in the process of calibrating the local time through the time information of the external GNSS module 1, since the 1PPS signal provided to the GNSS module 1 is generated by an atomic clock, its time scale error is generally tens of nanoseconds, which can be ignored; the programmable control module 3 generally uses a microsecond-level counter for the local crystal oscillator time, so the accuracy of the synchronization of the GNSS data and the local crystal oscillator time depends on the accuracy of the local time, that is, the microsecond level. Therefore, it is necessary to calibrate the local time through the time information of the external input received by the GNSS module 1, so that the 1PPS time recorded by the programmable control module 3 for the GNSS module 1 is aligned with the timing time triggered by the rising edge of the 1PPS of the GNSS module. In the process of alignment, it is necessary to calculate the deviation between the two PPS signals.
[0105] like Figure 6As shown, T2 represents the GNSS1PPS time recorded by the FPGA, T1 represents the FPGA trigger timing according to the rising edge of the GNSS PPS, and the 1PPS time generated by its external quartz crystal oscillator, and Δ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 make Δt as close to 0 as possible. The absolute value of this value is used to measure the size of the deviation. The deviation between the two PPS signals is calculated so that the square waves of the two PPS signals are aligned. The alignment methods include:
[0107] The programmable control module 3 uses the counter function in the timer to capture the GNSS-PPS pulse, starts counting when receiving the rising edge signal, stops counting when receiving the falling edge, and records the duration T2; at the same time as receiving the next rising edge, starts a timer, which is configured in advance as a PWM output mode with a duty cycle of 50%, and the output period is set to 1PPS according to the crystal oscillator frequency of the programmable control module 3, which is T1; due to the error between the external crystal oscillator and the GNSS clock, there is an error between T2 and T1, which is Δt; each GNSS-PPS rising edge will update a T2, and each update of T2 will generate a Δt=T2-T1.
[0108] At the same time, in order to make the accuracy higher, set the array err
[100] , loop to record Δt, and solve its average value Δt0, where the average value Δt0 is calculated using the following formula:
[0109] Δt0=(err[0]+err[1]+…err
[99] ) / 100;
[0110] Therefore, the reference 1PPS finally outputted by 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, which contains information such as time, date, position, speed, etc. It is a universal GNSS timing protocol. In order to enable the system to still publish the reference time when the GNSS is lost, the present invention generates the GPRMC signal TOD (Time Of Day) by FPGA simulation. When the GNSS is locked, the received GPRMC is directly used as TOD. After the GNSS loses lock, the TOD is continuously output through the 1PPS timing generated by itself.
[0113] Specifically, the TOD generation method includes:
[0114] First, determine the format and protocol of the GPRMC signal, including the start character, end character, meaning and order of each field of the data packet. Then use the programmable control module 3, for example, use the development tool Vivado to write the corresponding Verilog code to generate a data packet that conforms to the GPRMC format. In the code, first generate the start character and end character, and then generate the data of each field as needed, including time, date, location, speed and other information. Send the generated data packet to the sensor device through the output serial port of the programmable control module 3. The time-related data is accumulated based on the benchmark PPS of the programmable control module 3, so when the external GNSS cannot be received, the output of TOD can still be maintained.
[0115] Specifically, it can be seen from the above that the output PPS signal period is calibrated by GNSS module 1, and the calibration value is Δt0. In the case of GNSS module 1, this value is continuously updated. The longer the time, the closer Δt0 is to the true value and the more stable it is. In the case of no GNSS module 1, the Δt0 obtained by the last solution is used to update the time output. Figure 7 As shown, the switching of the clock reference before and after the loss of GNSS module 1 is explained. Specifically, since GNSS can only be received in an outdoor environment, PPS and the corresponding GPRMC are only available outdoors. Once you enter indoors, you will not be able to obtain them. When GNSS can be received, the internal time is always aligned with the external GNSS time, and its reference is essentially the satellite clock; once GNSS cannot be received, the time can only be maintained by the internal time, and its reference is the crystal oscillator.
[0116] A dual redundant time information switching mechanism is designed in the present invention. From the moment the programmable control module 3 receives the GPRMC sequence of the GNSS module 1, a set of simulated GPRMC sequences, called TOD, is also generated by using a high-precision crystal oscillator inside the FPGA. In addition, after receiving the PPS signal, a set of simulated PPS signals is also generated by using a timer. These two sets of signals are calibrated and aligned with the GNSS signal at each rising edge of the clock. When it is determined that there is no GNSS module 1 signal through the satellite search data, the external output is switched to TOD and PPS simulated based on the internal clock.
[0117] By adopting the above method of the present invention, two PPS signals are tested. Combined with actual application, the phase difference result with the waveform obtained by the GNSS module 1 is 1.656us. This deviation is within a reasonable range and fully meets the requirements of sensor synchronization.
[0118] In the GNSS module 1 stopping environment, the clock source generated by the internal crystal oscillator is used to output relevant information. After reacquiring the GNSS module 1 signal, the accuracy of the internal crystal oscillator is difficult to be comparable to the high-precision atomic clock of the GNSS module 1, and the waveforms of the two signals need to be realigned. Due to error accumulation, the clock error is inevitable when the GNSS module 1 is running in the stopping environment for a long time. If it is aligned with the GNSS module 1 waveform once, the error will be directly eliminated, but due to the existence of the error, a time section will be given to the clock of the entire system.
[0119] In view of the above-mentioned defects, the present invention proposes a smooth alignment method, which can eliminate the error as quickly as possible and prevent the data from experiencing large fluctuations.
[0120] Specifically, the above-mentioned smooth alignment method for eliminating errors and preventing large fluctuations in data includes:
[0121] One or more variables are designed to continuously obtain the size of the error so that the error of each alignment is within a certain range. The number of required alignments can be automatically calculated until the error variable is 0, thus achieving deviation elimination.
[0122] From the above, we can see that the error is Δt0. In the absence of GNSS input, the system always uses the last updated Δt0. Once GNSS is recaptured, Δt0 will be updated and recorded 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 in the array err
[100] to update the calculation of Δt0 will cause the output PPS waveform and TOD time to fluctuate greatly. Therefore, the present invention adopts a smooth correction method, that is, the system sets the value of Δt n -Δt0>100ms, the deviation is eliminated in multiple times, and the formula (Δt n -Δt0100ms)+1Calculate the number of times the error is eliminated.
[0123] Specifically, the purpose of the above-mentioned smoothing process is that if the GNSS is lost for a long time, the time maintained by the internal crystal oscillator and the GNSS reference time may produce an increasingly larger deviation. Through the above-mentioned smoothing process, the above-mentioned deviation is adjusted and reduced each time until it is fully adjusted and 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 area, after 1000 seconds of standard time has passed, it should theoretically be 11:16:40 on the same day in the same area mentioned above. However, since the internal crystal oscillator jumps quickly, it has jumped 1001 times, and the internal time is recorded as 11:16:41 on the same day in the same area mentioned above. If a GNSS signal is suddenly received at this time, the internal time will directly change from 41 seconds to 40 seconds if it is aligned directly, which will cause a defect in time synchronization. Therefore, through the above-mentioned smoothing process, the deviation time is adjusted back a little bit each time, and it will be fully adjusted back after a period of time.
[0125] Specifically, in the above-mentioned method of synchronizing indoor and outdoor data, the algorithm model is called to perform deviation calculation and smoothing on the signals that need to be aligned, so that indoor and outdoor data are synchronized. After step f) verifying the clock synchronization, it is necessary to perform g) driving the sensor: send the data stream with precise clock information to each sensor in the custom format TOD and PPS to realize the collection of data with timestamp information.
[0126] Specifically, the acquisition of data with timestamp information mainly includes external sensor synchronization, and the synchronization of external sensors mainly includes time synchronization between the inertial measurement module 2 (IMU) and the GNSS module 1 and time synchronization between other sensors and the GNSS module 1 .
[0127] Specifically, Figure 8 FIG. 1 is a schematic diagram of time synchronization between an inertial measurement unit and a GNSS module in a method for seamless indoor and outdoor data synchronization provided by 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 the present invention. The local clock count values of the start and end times corresponding to the 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, and the TOD time 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 time-synchronized with the GNSS module 1 include:
[0131] like Fig. 9As shown, a schematic diagram of the process of synchronizing other sensors with GNSS time in the indoor and outdoor seamless data synchronization method provided by an embodiment of the present invention, for external devices, the PPS reference signal generated by the present invention can be used to trigger sampling, and the corresponding TOD can be used as the sampling timestamp. According to the different sampling frequencies of the external sensors, 1PPS can be divided into the required frequencies by frequency division, and the time reference of the collected data can be unified by directly connecting the TOD to the sensor or writing the sensor data packet through the host computer according to the requirements of the device.
[0132] In summary, in the present invention, the unmanned system needs to realize the fusion of multi-source data through an accurate, safe and economical time synchronization system. In the prior art, in order to solve the problems existing in the above-mentioned unmanned system, the most commonly used methods in embedded time synchronization technology are based on GNSS reference time and based on the embedded board's own clock. The method based on GNSS reference time is to use the 1PPS signal and GPRMC time information output by GNSS to provide a time reference for external devices, but due to its dependence on GNSS, time synchronization cannot be achieved in GNSS-denied environments such as indoors. The method based on the embedded board's own clock is to use the timing self-generation module of the embedded board to generate a stable pulse trigger signal according to its own clock and crystal oscillator for triggering external sensors, and the data sampling timestamp is obtained through the host computer time system. The time scale maintenance precision of this method depends on the crystal oscillator quality of the embedded board, so it is impossible to maintain high-precision absolute time synchronization for a long time, resulting in the inability to achieve accurate time synchronization of multi-sensor data of unmanned systems in indoor and outdoor environments. In order to solve the problem of indoor and outdoor time being unable to be accurately synchronized in the prior art, this application uses the structure of GNSS module 1, inertial measurement module 2 and programmable control module 3, and a method of determining whether the indoor and outdoor time is synchronized by calculating whether the two PPS signals are aligned. The result is accurate and accurate, and can achieve accurate time synchronization of multi-sensor data of unmanned systems in indoor and outdoor environments. The accuracy of hardware synchronization is improved, and the problem of discontinuous GNSS time information in complex indoor and outdoor environments is solved. At the same time, the present invention adopts FPGA chips, and the overall device size, power consumption, and weight are small; it can independently generate a time base, does not rely on network communication, and meets the needs of small unmanned systems.
[0133] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In addition, "front", "back", "left", "right", "upper" and "lower" in this article are all referenced to the placement state 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, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A seamless indoor and outdoor data synchronization device, characterized in that: include: A GNSS module, wherein the GNSS module is used to receive a 1PPS signal and GPRMC information generated by an external atomic clock; An inertial measurement module, which is used to fuse the information generated by the GNSS module to generate position, attitude and speed information; A 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 GPRMC information of the GNSS module and the position, attitude and speed information generated by the inertial measurement module, and aligning the square wave generated by the local clock with the 1PPS signal square wave of the GNSS module, and dividing the square wave according to a preset frequency, and continuously and stably outputting a pulse wave signal and time information of a corresponding frequency through the serial port, and calibrating the clock signal through an external calibration factor. At the same time, an algorithm model is set in the programmable control module. When synchronizing indoor and outdoor data, the algorithm model is called to perform deviation calculation and smoothing processing on the signal to be aligned, so as to synchronize indoor and outdoor data.
2. The indoor and outdoor seamless data synchronization device according to claim 1, characterized in that: The programmable control module includes an FPGA chip.
3. The indoor and outdoor seamless data synchronization device according to claim 1, characterized in that: The inertial measurement module includes an IMU.
4. The indoor and outdoor seamless data synchronization device according to any one of claims 1 or 3, characterized in that: The inertial measurement module comprises: An inertial measurement unit, the inertial measurement unit is connected to an external first power module so that the first power module supplies power to the inertial measurement unit, and the inertial measurement unit is used to measure acceleration and angular velocity in motion; A plug connector, on which a plug interface and an external interface are provided; An integrated navigation solution chip, wherein the integrated navigation solution chip is connected to the connector via the plug interface, and is connected to the programmable control module via the external interface, and the integrated navigation solution 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 speed information; A fixing seat, wherein the fixing seat is fixedly connected to the inertial measurement unit and the integrated navigation solution chip, and is used to fix the inertial measurement unit and the integrated navigation solution chip.
5. The indoor and outdoor seamless data synchronization device according to claim 1, characterized in that: The GNSS module includes: A second power supply module, wherein the second power supply module is used for supplying power; An antenna, the antenna being used to receive a 1PPS signal and GPRMC information generated by the external atomic clock; A GNSS chip is connected to the second power module and the antenna, and is used to locate the position where the antenna receives the 1PPS signal and GPRMC information generated by the atomic clock.
6. The indoor and outdoor seamless data synchronization device according to claim 1, characterized in that: The calibration factors include frequency offset parameters and phase deviation parameters, and the parameters can be defined and set in a programmable control module for data reception.
7. A method for seamless indoor and outdoor data synchronization using the indoor and outdoor seamless data synchronization device according to any one of claims 1 to 6, characterized in that: include: The local time is calibrated by the time information of the external input received by the GNSS module, so that the 1PPS time recorded by the programmable control module for the GNSS module is aligned with the timing time triggered by the rising edge of the PPS of the GNSS module in the programmable control module; 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 so that the aligned time is synchronized with the global standard time, so that the indoor and outdoor times are the standard time.
8. The method for seamless indoor and outdoor data synchronization according to claim 7, characterized in that: The deviation between the two PPS signals is calculated using the following formula: Δt = T2 - T1; Where: Δt represents the difference between two PPS signals, T2 represents the 1PPS time of the GNSS module received by the programmable control module, and T1 represents the timing triggered by the programmable control module according to the rising edge of the PPS of the GNSS module; At the same time, in order to make the calculated deviation between the two PPS signals more accurate, an array needs to be set during the calculation process to cyclically record the difference Δt between the two PPS signals and solve their average value Δt0; The average value Δt0 is calculated by the following formula: Δt0=(err[0]+err[1]+…err[99]) / 100; Wherein: 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.
9. The method for seamless indoor and outdoor data synchronization according to claim 7, characterized in that: Using the programmable control module to simulate and generate the GPRMC signal TOD includes: Determine the format and protocol of the GPRMC signal, and use the programmable control module to write the corresponding protocol code to generate data packets that conform to the GPRMC format; In the code, the start character and the end character are generated, the data of 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 TOD. After the GNSS module loses lock, it continues to output TOD through the 1PPS timing generated by itself.
10. The method for seamless indoor and outdoor data synchronization according to claim 7, characterized in that: Correcting the deviation so that the aligned time is synchronized with the global standard time, so that the indoor and outdoor time is the standard time, including: realigning the waveforms corresponding to the time of the two PPSs by a smoothing method, so that the deviation of the time of the two PPSs is eliminated; The smoothing method includes: In the process of calculating the deviation between the two PPS signals, one or more variables are set, and the magnitude of the deviation is continuously calculated so that the time between the two PPS signals is aligned, and the number of alignments is automatically calculated until the variable value of the deviation calculation is 0, so that the deviation can be eliminated. In the process of deviation elimination, the following formula is used for calculation: t2=t1+(T2-T1)+Δt0×(T2-T1) / (T3-T1); Among them: T1 represents the starting value corresponding to the 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 end time, t1 and t2 represent the variables set in the process of calculating the deviation between the two PPS signals, among which t1 represents the TOD time corresponding to T1, and t2 represents the TOD time at the IMU sampling time.
Citation Information
Patent Citations
Distributed POS (Position and Orientation System) sub-IMU (Inertial Measurement Unit) synchronous data acquisition system
CN102736591A
Shortwave channel synchronous device and shortwave channel synchronous switching control system
CN103051409A
Clock synchronization method of distributed control system
CN103995471A
Time calibration method and device
CN104460311A
Universal GPS indoor and outdoor positioning system and method
CN104898129A
Cited By
On-satellite time synchronization method and system based on pulse per second
CN121785086A