CN108519610B - Multi-sensor combined navigation system time synchronization and real-time data acquisition method - Google Patents
Multi-sensor combined navigation system time synchronization and real-time data acquisition method Download PDFInfo
- Publication number
- CN108519610B CN108519610B CN201810273807.0A CN201810273807A CN108519610B CN 108519610 B CN108519610 B CN 108519610B CN 201810273807 A CN201810273807 A CN 201810273807A CN 108519610 B CN108519610 B CN 108519610B
- Authority
- CN
- China
- Prior art keywords
- time
- data
- sensor
- pps
- gps
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S19/00—Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
- G01S19/01—Satellite radio beacon positioning systems transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
- G01S19/13—Receivers
- G01S19/24—Acquisition or tracking or demodulation of signals transmitted by the system
- G01S19/25—Acquisition or tracking or demodulation of signals transmitted by the system involving aiding data received from a cooperating element, e.g. assisted GPS
- G01S19/256—Acquisition or tracking or demodulation of signals transmitted by the system involving aiding data received from a cooperating element, e.g. assisted GPS relating to timing, e.g. time of week, code phase, timing offset
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S19/00—Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
- G01S19/38—Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
- G01S19/39—Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
- G01S19/42—Determining position
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Position Fixing By Use Of Radio Waves (AREA)
Abstract
The invention relates to a multi-sensor integrated navigation system time synchronization and real-time data acquisition method, which realizes time synchronization based on a Linux local clock, and comprises the steps of performing real-time transformation on a standard Linux system to ensure that an operating system running on a calculation carrier meets the hard real-time requirement; data acquisition and time synchronization are realized, so that the time scales of data acquired by the sensors are consistent with those of a standard GPS, and then the data enter a buffer area to prepare for the fusion of combined navigation data; the data acquisition and the time synchronization are realized by taking the PPS signal output by the GPS receiver as a reference, correcting the local clock of the calculation carrier and then marking time marks for other sensors by utilizing the local clock of the calculation carrier. The invention can realize the time synchronization precision within 10ms without adding extra hardware, meets the requirement of multi-sensor data fusion, and has the advantages of simple programming, wide application and convenient transplantation.
Description
Technical Field
The invention belongs to the field of multi-sensor integrated navigation, and particularly relates to a time synchronization and data acquisition method for real-time multi-sensor integrated navigation.
Background
Under the ground complex environment such as urban canyons and the like, the GNSS signal cannot provide high-precision reliable positioning navigation service due to the fact that the GNSS signal is susceptible to shielding and multipath, and under the condition, the integrated multi-sensor integrated navigation becomes a preferred scheme for solving navigation under the ground complex environment. Due to the fact that data time scales are inconsistent due to the fact that sampling time moments of the sensor data are different, errors are introduced into data fusion of combined navigation, and even fusion errors are caused, the problem of time synchronization of the multi-sensor data is solved, and particularly under the real-time condition, the method is the key for achieving multi-sensor optimal fusion.
The time synchronization of the real-time multi-sensor data is divided into two schemes at present, firstly, an external FPGA chip is adopted as a unified clock source for data acquisition, the existing multi-sensor combined system generally adopts the time synchronization mode, the time synchronization mode has high synchronization precision, but the chip is required to be added independently, and the sensor expansion and maintenance are required to be realized by independent programming; secondly, a local clock of a computing carrier (such as an ARM development board) is directly adopted as a clock source of time synchronization for soft synchronization, the method has good expansibility, does not need special chip support, is simple in programming realization, and is relatively low in synchronization precision. Software synchronization is adopted to enable time synchronization precision to meet requirements, an operating system is often required to meet hard real-time requirements, the time synchronization is mostly carried out by adopting Linux based on independent real-time kernels such as RTAI (real time architecture interface), Xenomai (extensible markup language) and the like in the conventional research, but the method can only be used for a certain specific chip type, and the programming of the method is based on the independent real-time kernels, so the method is difficult to realize in practical application and has poor universality.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a combined navigation multi-sensor data acquisition and time synchronization method which is simple to realize, has good universality and can meet the real-time combined navigation requirement.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a multi-sensor combined navigation system time synchronization method is realized based on a Linux local clock, and is realized as follows,
the real-time reconstruction of a standard Linux system is carried out, so that an operating system running on a computing carrier meets the hard real-time requirement; data acquisition and time synchronization are realized, so that the time scales of data acquired by the sensors are consistent with those of a standard GPS, and then the data enter a buffer area to prepare for the fusion of combined navigation data;
the data acquisition and the time synchronization are realized by taking the PPS signal output by the GPS receiver as a reference, correcting the local clock of the calculation carrier and then marking time marks for other sensors by utilizing the local clock of the calculation carrier.
And the real-time modification of the standard Linux system comprises the step of rewriting a standard Linux kernel by using a PREEMPT-RT patch so that the Linux kernel becomes a kernel which can be completely occupied.
And after the Linux kernel is completely preempted, regenerating a GPIO interrupt driver, a serial port driver and a USB driver under a new kernel framework, wherein the GPIO driver is used for processing an input PPS second pulse signal, and the serial port driver and the USB driver are used for receiving multi-sensor data.
And under the condition of fully preempting the kernel, the priority of the acquisition thread of the PPS signal is set to be the highest, and the priority of the acquisition threads of other multi-sensor data is slightly lower than that of the acquisition thread of the PPS signal but higher than that of other Linux kernel threads.
The PPS signal output by the GPS receiver is used as a reference, and the implementation mode of correcting and calculating the local clock of the carrier is that after the PPS signal acquisition thread enters interruption, the local time of the arrival time of the PPS signal is recorded, and then the difference is made with the standard GPS time in a GPS time data packet corresponding to the subsequently received PPS signal, so that the difference dT between the local clock at the current time and the GPS time is obtained; when the data acquisition of the multiple sensors is interrupted and triggered, the local time of the moment is recorded, and then the time mark is corrected by using the dT to obtain the data of each sensor under a GPS time mark system, so that the data of each sensor is reduced under a GPS time frame.
And correcting the data of each sensor obtained by correction under the GPS time scale system by adopting the time delay from the sensor port to the calculation carrier to obtain the accurate and synchronous multi-sensor data.
The invention also provides a data acquisition method of the multi-sensor integrated navigation system based on the time synchronization method of the multi-sensor integrated navigation system.
And allocating an FIFO queue for each sensor, adding multi-sensor data subjected to time scale correction into respective queues, polling by taking the sensor with the highest sampling rate as a reference, searching the multi-sensor data closest to the current moment, interpolating, reducing to a uniform time point and packaging into a new data queue.
On the basis of a standard Linux system, the Linux operating system widely running on various ARM development boards, PC computers and other computing carrier devices is completely preemptive modified to meet the hard real-time requirement; on the basis, the high-precision standard time provided by the PPS second pulse signal is utilized to calibrate the local clock in real time, so that the local clock maintains higher precision. The key point is that under the hard real-time condition, the transmission delay of various data, especially PPS signals, can be strictly ensured and calibrated in advance, so that the soft time synchronization in the invention can reach the synchronization precision within 10ms, the requirement of multi-sensor data fusion is met, and the method is simple to implement, wide in application and convenient to transplant. And each type of sensor is buffered by adopting a queue mode, and all data are interpolated and packed by using the sensor data with the highest sampling rate, so that great convenience is provided for subsequent multi-sensor data fusion, and the method has important market value.
Drawings
Fig. 1 is an overall frame diagram of an embodiment of the present invention.
Fig. 2 is a schematic diagram of time synchronization according to an embodiment of the present invention.
FIG. 3 is a diagram illustrating a data buffer design according to an embodiment of the present invention.
Detailed Description
The following detailed description of the embodiments of the present invention will be made with reference to the accompanying drawings.
The invention provides real-time modification of a standard Linux system, which aims to enable an operating system running on a computing carrier (such as an ARM development board) to meet hard real-time requirements; the data acquisition and time synchronization is characterized in that the time scale of data acquired by sensors such as an IMU (inertial measurement Unit), a speedometer and the like is consistent with that of a standard GPS (global positioning system), and then the data enter a designed buffer area to prepare for the fusion of combined navigation data, and the method specifically comprises the following steps: and correcting the local clock of the calculation carrier by taking the PPS signal output by the GPS receiver as a reference, and then marking the time marks for other sensors by using the local clock of the calculation carrier.
The embodiment of the invention is realized as follows:
firstly, a standard Linux kernel is rewritten by using a PREEMPT-RT patch, so that the kernel can be completely preempted, and the requirements of a hard real-time operating system are met. And meanwhile, the GPIO driver, the USB driver and the serial port driver are rewritten under the condition that the kernel framework can be completely preempted, wherein the GPIO driver is used for receiving PPS second pulse signals output by the GNSS, and the serial port driver and the USB driver are used for receiving multi-sensor data.
And then, under the modified Linux system framework, a separate thread is created for each type of sensor to receive sensor data, the thread priority of the PPS second pulse receiving thread is set to be the highest, and other sensor data receiving threads are slightly lower but higher than the common Linux kernel thread.
After receiving the PPS second pulse signal, the PPS second pulse signal acquisition thread enters interruption, the local time of the arrival time of the PPS second pulse signal is recorded, and then the difference is made with the standard GPS time in a GPS time data packet corresponding to the PPS second pulse signal received later, so that the difference dT between the current local clock and the GPS time is obtained; meanwhile, when the multi-sensor data acquisition is triggered in an interruption mode, the local time of the moment is recorded, and then the local time of the recorded multi-sensor data reaching moment is corrected by using the dT.
And maintaining an independent FIFO queue for each type of sensor, polling the sensor with the highest sampling rate as a reference after the sensor data after time calibration enters the respective queue, searching the multi-sensor data closest to the current moment, interpolating, reducing to a uniform time point, packaging, entering a new data queue, and preparing for data fusion.
Through the scheme, the standard Linux kernel is modified in real time by adopting the PREEMPT-RT patch, so that Linux meets the requirement of hard real time, and a PPS second pulse signal output by a GPS receiver is directly received in an interrupt mode at a Linux driving layer, so that the delay caused by system scheduling is reduced to the maximum extent; continuously calibrating the local clock by continuously comparing the difference of the PPS signal under a local clock system and a standard GPS time system; meanwhile, the characteristic that the local clock has high short-term stability in a PPS interval is utilized to mark high-precision time scales on the multi-sensor data, so that the unification of the time scales of the combined navigation multi-sensor data under the real-time condition is realized; according to the characteristics of multi-sensor combined navigation data fusion under the real-time condition, the FIFO queue is adopted to store the data of each sensor after the time marks are unified, the sensor with the highest sampling rate is used as a reference, the multi-sensor data is interpolated and reduced to a unified time point, and convenience is provided for the multi-sensor data fusion.
As shown in FIG. 1, the implementation of the present invention is implemented in two steps, respectively, in the driver layer and the application layer of Linux. Firstly, receiving PPS second pulse signals, time data packets of PPS signals and data packets of other sensors by a GPIO driver and a USB port (or serial port) driver of a real-time modified Linux system running on a calculation carrier on a driver layer; when the corresponding driver detects the signal, recording the local time of the Linux at the arrival moment of the signal and transmitting the local time to an application layer; and then, in an application layer, correcting a Linux local clock by taking the difference between the Linux local time corresponding to the PPS signal and the GPS standard, so that the data of each sensor is unified under a standard GPS time frame and stored in a corresponding cache region for reading by an algorithm interface and a file storage thread.
The improvement of the invention mainly comprises the real-time reconstruction of a standard Linux system, the synchronization of data acquisition and time, the design of a data buffer area, and the realization of each part is explained in detail as follows:
real-time transformation of standard Linux kernel
The standard Linux kernel only has soft real-time capability, and the kernel can be completely preempted through the PREEMPT-RT patch packet. For the standard Kernel part, the installation of the PREEMPT-RT patch is performed by the bzcat./patch-x.x.xx-rtxx.patch.bz2 | patch-p1 command, and then the compilation options of the Kernel are configured, so that the preemption mode (PREEMPT model) is configured to be Fully Preemptible (full PREEMPT Kernel (RT)). For serial ports, USB drives and the like of sensors, two types are mainly involved: the first type is a spin _ lock type and needs to be replaced by spin _ lock _ t, so that the function behavior using the spin _ lock type can be scheduled without forbidding preemption; the second type is that spin _ lock _ irqsave needs to be replaced by raw _ local _ irq _ save, so as to deal with the situation that in the PREEMPT-RT environment, spin _ lock _ irqsave does not disable interrupts and preemption, and local _ irq _ save does not disable interrupts, but only disables preemption.
For GPIO drive, directly realize the receiving interruption of PPS in the drive, reduce the delay of PPS second pulse signal in system scheduling to the utmost extent, guarantee the precision of time synchronization, specifically: registering a corresponding GPIO port as a misdevice, and providing four interfaces of 'opening', 'closing', 'monitoring' and 'reading' according to the mode of a standard misdevice for calling by an application layer; the local time of arrival of the PPS signal is saved and stored in the interrupt service function, while the interrupt flag is set and the wait queue is awakened. And after the GPIO driver is independently compiled, directly mounting the GPIO driver in an operating system.
The related symbols are terms in the Linux system, and the description of the invention is omitted.
Two, time synchronization scheme
The difference between the PPS second pulse signal output by the GPS receiver and the standard GPS time is usually within tens of nanoseconds, and the PPS second pulse signal can be used as a high-precision absolute time source of multi-sensor time synchronization. Fig. 2 is a time synchronization scheme of the present invention. The PPS second pulse signal is sent to a calculation carrier according to the frequency of 1Hz, the calculation carrier can record the Linux local time of the arrival time of the signal at the same time, a data packet containing the standard GPS time corresponding to the PPS signal is received after short delay, the time of the signal under the local clock and the standard GPS time is subjected to difference, and the Linux local clock is calibrated by using the difference; after calibration, the sensor data of the time mark is recorded by using a Linux local clock, namely, the sensor data is reduced to a standard GPS time frame, and then the transmission delay of the calculated sensor data packet is used for correction, so that the accurate GPS time mark corresponding to the sensor data packet can be obtained.
The PPS signal output by the GPS receiver is a square wave electric signal, so the PPS signal can be directly input into a GPIO port of the development board. In addition, a monitoring thread is separately opened up on the application layer, and a GPIO port for receiving PPS signals is specially monitored so as to obtain data uploaded by the driving layer. In the monitoring thread, after the equipment node is opened, the reading function in the thread is matched with the corresponding interface in the driver, and the reading function is repeatedly called in the dead cycle; once the thread runs to the read function, the drive-in waits for interruption, and the thread enters a sleep state until being awakened after receiving the PPS signal entering the interruption.
After the time of the PPS signal reaching the local is acquired, the PPS time data packet (when the standard GPS of the signal) corresponding to the PPS signal is acquired through serial port interruption after short delay, and after the difference is obtained by differentiating two time scales of the PPS signal, the PPS time data packet can be used for calibrating a local clock:
where superscripts g and l denote GPS time and local time, respectively, and subscripts sensor and PPS denote multi-sensor data and PPS signals, respectively, i.e.Andrespectively representing the time of the sensor data and the PPS signal under the recorded local time scale, and obtaining the difference between the current local clock and the GPS time Is the standard GPS time of the PPS signal,to correct for standard GPS of the acquired sensor data. Through the above formula, the data of each sensor under the GPS time scale system can be obtained, and the data of each sensor is reduced under the GPS time frame.
In addition, because the PPS signal is an electrical signal in nature, the transmission delay of the PPS signal can be ignored, the delay of the PPS signal only depends on the response time of a system, and the response time of the system can be guaranteed within 10ms after the real-time transformation of the Linux system is carried out. On the other hand, the time delay of the serial port and the USB port for receiving the sensor data is often not negligible due to the influence of the data transmission rate and the data volume. This part of the delay is divided into two parts: firstly, the time delay from sampling to an output port in the sensor; the second is the time delay from the sensor port to the computation carrier. For the first part of time delay, a calibration result given by a sensor can be directly adopted generally; for the second part of the time delay, taking serial port communication as an example, the following formula can be adopted for estimation:
δT=nbytes×Nbits/B
where δ T denotes the transmission delay, nbytesNumber of bytes, N, representing sensor packetbitsThe number of data bits for a single byte for serial transmission (e.g., for a typical serial configuration, the number of data bits is 8, and 1 start bit and 1 stop bit, then Nbits10), B represents the baud rate of the serial configuration.
After the data of each sensor is reduced under the GPS time frame, the accurate and synchronous multi-sensor data can be obtained through the correction of the transmission time delay. In particular embodiments, standard GPS time of sensor data obtained by calibration may be usedAnd directly subtracting the transmission delay delta T to obtain the accurate and synchronous multi-sensor data.
Thirdly, data acquisition and storage
The data acquisition and storage module is positioned in an application layer of the Linux system and can be directly linked to a data processing program. During data acquisition, each type of sensor independently opens up a thread, and the thread priority is set to be higher than that of a common Linux kernel thread but slightly lower than that of a PPS signal receiving thread. In addition, the invention also provides a main buffer zone thread which is used for inquiring whether each queue has new data which can be dequeued, and packaging all the currently dequeued data and storing the data into the buffer queue. In each data acquisition thread, monitoring is carried out on an application layer by adopting a poll mechanism, once the data heads of each sensor are matched, the local time of the current moment is recorded as the time scale of the current data packet, and then the steps of decoding and the like are carried out.
And after the packet of data of each sensor is received, packaging each packet of data and entering a corresponding data queue. FIG. 3 is a diagram of a buffer design according to the present invention. The main buffer area refers to a buffer area for operating all sensor data. The sub-buffer is a buffer for operating data of a certain sensor, and each sensor corresponds to one sub-buffer. And each sensor corresponds to an acquisition thread and a queue, for example, when the acquisition thread 1 and the queue 1 are queues for acquiring a certain sensor data acquisition thread and accessing acquired data, and the acquisition thread 2 and the queue 2 are queues … for acquiring another sensor data acquisition thread and accessing acquired data, in the multi-sensor integrated navigation system, the acquisition thread and the queue can be respectively set for a specific sensor.
Each data acquisition thread corresponds to one FIFO buffer queue, and enqueue operation is carried out after data packaging is finished. In the main buffer area, the data queue with the highest sampling rate is used as a reference, when new data appears in the queue, the dequeue operation is carried out on the data packet, then whether the data which is not dequeued exists in other queues is searched, and if the data exists, the dequeue operation is carried out. And after all queues are searched, interpolating the dequeued sensor data, and unifying the dequeued sensor data to the time point of the data with the highest sampling rate. And then, data unified to the same time point is packaged and enqueued in a main buffer queue (namely, a buffer queue of a main buffer area), and the data are exposed to a thread for writing files and an algorithm layer, and only the buffer queue needs to be read at the algorithm layer.
It should be noted that the queue in the above step needs to perform locking (read-write locking) operation to avoid read-write collision of the same data packet.
In specific implementation, a person skilled in the art can implement automatic operation of the above processes by using software technology.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.
Claims (6)
1. A multi-sensor integrated navigation system time synchronization method is characterized in that: the method is used for solving the problem of time synchronization of multi-sensor data in the integrated multi-sensor combined navigation when GNSS signals cannot provide high-precision reliable positioning navigation service due to the fact that the GNSS signals are easily influenced by shielding and multiple paths under the complex ground environment; comprises realizing time synchronization based on a Linux local clock, which is realized as follows,
the real-time reconstruction of a standard Linux system is carried out, so that an operating system running on a computing carrier meets the hard real-time requirement; data acquisition and time synchronization are realized, so that the time scales of data acquired by the sensors are consistent with those of a standard GPS, and then the data enter a buffer area to prepare for the fusion of combined navigation data;
the data acquisition and time synchronization are realized by taking a PPS signal output by a GPS receiver as a reference, correcting a local clock of a calculation carrier, marking time scales for other sensors by using the local clock of the calculation carrier, keeping the time scales of data acquired by an IMU (inertial measurement Unit) and an odometer sensor consistent with those of a standard GPS (global positioning system), and then entering a buffer area to prepare for the fusion of combined navigation data; under the hard real-time condition, the transmission delay of various data including PPS signals can be strictly ensured and calibrated in advance, so that the soft time synchronization can reach the synchronization precision within 10ms, and the requirement of multi-sensor data fusion is met;
the real-time modification of the standard Linux system comprises the steps of utilizing a PREEMPT-RT patch to rewrite a standard Linux kernel, and enabling the Linux kernel to become a completely preemptible kernel; the Linux meets the requirement of hard real-time, and directly receives the PPS second pulse signal output by the GPS receiver in an interrupt mode at a Linux driving layer, so that the delay caused by system scheduling is reduced to the maximum extent; continuously calibrating the local clock by continuously comparing the difference of the PPS signal under a local clock system and a standard GPS time system; meanwhile, the characteristic that the local clock has high short-term stability in a PPS interval is utilized to mark high-precision time scales on the multi-sensor data, so that the unification of the time scales of the combined navigation multi-sensor data under the real-time condition is realized; according to the characteristics of multi-sensor combined navigation data fusion under the real-time condition, the data of each sensor with unified time marks are stored by adopting an FIFO queue, and the data of the multi-sensor is interpolated and reduced to a unified time point by taking a sensor with the highest sampling rate as a reference, so that convenience is provided for the multi-sensor data fusion;
after the Linux kernel is completely preemptable, regenerating a GPIO interrupt driver, a serial port driver and a USB driver under a new kernel framework, wherein the GPIO driver is used for processing an input PPS second pulse signal, and the serial port driver and the USB driver are used for receiving multi-sensor data; the implementation process is as follows,
in the driving layer, a GPIO driver and a USB port or a serial port driver of a real-time modified Linux system running on a calculation carrier receive PPS second pulse signals, time data packets of PPS signals and data packets of other sensors; when the corresponding driver detects the signal, recording the local time of the Linux at the arrival moment of the signal and transmitting the local time to an application layer;
and then, in an application layer, correcting a Linux local clock by taking the difference between the Linux local time corresponding to the PPS signal and the GPS standard, so that the data of each sensor is unified under a standard GPS time frame and stored in a corresponding cache region for reading by an algorithm interface and a file storage thread.
2. The multi-sensor integrated navigation system time synchronization method of claim 1, wherein: under the condition of a fully preemptible kernel, the priority of the acquisition thread of the PPS signal is set to be the highest, and the priority of the acquisition threads of other multi-sensor data is slightly lower than that of the acquisition thread of the PPS signal but higher than that of other Linux kernel threads.
3. The multi-sensor integrated navigation system time synchronization method according to claim 1 or 2, wherein: the method comprises the following steps of taking a PPS signal output by a GPS receiver as a reference, and correcting and calculating a local clock of a carrier in an implementation mode that after a PPS signal acquisition thread enters interruption, recording local time of arrival time of the PPS signal, and then making a difference with standard GPS time in a GPS time data packet corresponding to a subsequently received PPS signal to obtain a difference dT between the local clock at the current time and the GPS time; when the data acquisition of the multiple sensors is interrupted and triggered, recording the local time of the moment, and then correcting the time scale by using a dT (time division full) to obtain the data of each sensor under a GPS (global positioning system) time scale system, so that the data of each sensor is reduced under a GPS time frame; the implementation mode comprises the following procedures,
the PPS signal output by the GPS receiver is a square wave electric signal and is directly input into a GPIO port of the development board; a monitoring thread is independently opened up on an application layer, and a GPIO port for receiving PPS signals is specially monitored so as to obtain data uploaded by a driving layer; in the monitoring thread, after the equipment node is opened, the reading function in the thread is matched with the corresponding interface in the driver, and the reading function is repeatedly called in the dead cycle; once the thread runs to the reading function, the drive is started to wait for interruption, and the thread enters a dormant state until receiving a PPS signal and is awakened after the PPS signal enters the interruption;
after the time of the PPS signal reaching the local is acquired, when the PPS time data packet corresponding to the PPS signal comprises the standard GPS of the signal, the PPS time data packet is acquired through serial port interruption after short delay, and after two time scales of the PPS signal are differentiated to obtain a difference value, the difference value is used for calibrating a local clock:
where superscripts g and l denote GPS time and local time, respectively, and subscripts sensor and PPS denote multi-sensor data and PPS signals, respectively, i.e.Andrespectively representing the time of the sensor data and the PPS signal under the recorded local time scale to obtain the difference between the current local clock and the GPS time Is the standard GPS time of the PPS signal,standard GPS time for the corrected sensor data; obtaining data of each sensor under a GPS time scale system through the above formula, and realizing the reduction of the data of each sensor under a GPS time frame;
in addition, the PPS signal is an electrical signal essentially, the transmission delay is ignored, the delay only depends on the response time of the system, and the response time of the system is guaranteed within 10ms after the real-time transformation of Linux; on the other hand, the time delay of the serial port and the USB port for receiving the sensor data is influenced by the data transmission rate and the data quantity, and the time delay is divided into two parts: firstly, the time delay from sampling to an output port in the sensor; secondly, the time delay from the sensor port to the calculation carrier; for the first part of time delay, directly adopting a calibration result given by a sensor; for the second part of time delay, estimating according to the byte number of the sensor data packet and the data bit number of the single byte to be transmitted;
after the sensor data is reduced under the GPS time frame, the transmission time delay is corrected to obtain the accurate synchronous multi-sensor data, including the standard GPS time of the corrected sensor dataAnd directly subtracting the transmission delay delta T to obtain the accurate and synchronous multi-sensor data.
4. The multi-sensor integrated navigation system time synchronization method of claim 3, wherein: and correcting the data of each sensor under the GPS time scale system by adopting the time delay from the sensor port to the calculation carrier to obtain the accurate and synchronous multi-sensor data.
5. A data acquisition method of a multi-sensor combined navigation system is characterized by comprising the following steps: data acquisition is realized based on the multi-sensor integrated navigation system time synchronization method of any one of claims 1 to 4.
6. The data collection method of the multi-sensor integrated navigation system according to claim 5, wherein: allocating an FIFO queue for each sensor, adding multi-sensor data subjected to time scale correction into respective queues, polling by taking a sensor with the highest sampling rate as a reference, searching multi-sensor data closest to the current moment, interpolating, reducing to a uniform time point and packaging into a new data queue.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810273807.0A CN108519610B (en) | 2018-03-29 | 2018-03-29 | Multi-sensor combined navigation system time synchronization and real-time data acquisition method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810273807.0A CN108519610B (en) | 2018-03-29 | 2018-03-29 | Multi-sensor combined navigation system time synchronization and real-time data acquisition method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108519610A CN108519610A (en) | 2018-09-11 |
CN108519610B true CN108519610B (en) | 2022-03-04 |
Family
ID=63431348
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810273807.0A Active CN108519610B (en) | 2018-03-29 | 2018-03-29 | Multi-sensor combined navigation system time synchronization and real-time data acquisition method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108519610B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109445959A (en) * | 2018-10-17 | 2019-03-08 | 北京技德终端技术有限公司 | A kind of sensing data processing real time operating system |
CN111083309B (en) * | 2018-10-18 | 2022-04-01 | 北京魔门塔科技有限公司 | Time alignment method of multi-sensor data and data acquisition equipment |
CN109917637B (en) * | 2019-03-13 | 2020-10-09 | 清华四川能源互联网研究院 | High-precision time service method for data acquisition card |
CN110174103A (en) * | 2019-04-02 | 2019-08-27 | 合肥杰发科技有限公司 | A kind of navigation method and device |
CN110502475A (en) * | 2019-07-25 | 2019-11-26 | 长沙行深智能科技有限公司 | A kind of more data access methods of unmanned vehicle, device, medium and equipment |
CN110435880B (en) * | 2019-08-12 | 2022-07-29 | 深圳市道通智能航空技术股份有限公司 | Data acquisition method, unmanned aerial vehicle and storage medium |
CN111045032A (en) * | 2019-12-28 | 2020-04-21 | 中国科学院国家授时中心 | Time synchronization motion delay correction method based on single-point pseudo-range reduction and application |
CN113556366B (en) * | 2020-04-07 | 2023-09-26 | 舜宇光学(浙江)研究院有限公司 | Multi-sensor data synchronization method and system and electronic equipment thereof |
CN111721299B (en) * | 2020-06-30 | 2022-07-19 | 上海汽车集团股份有限公司 | Real-time positioning time synchronization method and device |
CN111970077B (en) * | 2020-08-13 | 2023-03-10 | 中国科学院国家天文台 | High-precision absolute time and system synchronization method for detector reading system |
CN112416051A (en) * | 2020-12-07 | 2021-02-26 | 哈尔滨工业大学 | Timing method, timing device, electronic equipment and computer storage medium |
CN113218435B (en) * | 2021-05-07 | 2023-01-17 | 复旦大学 | Multi-sensor time synchronization method |
CN113759815A (en) * | 2021-08-03 | 2021-12-07 | 北京工业职业技术学院 | IOTPLC processing platform of interconnected factory based on edge calculation |
CN116054987B (en) * | 2022-10-12 | 2023-12-15 | 哈尔滨市科佳通用机电股份有限公司 | Timing method of vehicle-mounted equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1749916A (en) * | 2004-09-16 | 2006-03-22 | 中国科学院电子学研究所 | Insert the method that the GPS pps pulse per second signal realizes that precise time is aimed at computing machine |
CN102193497A (en) * | 2010-03-05 | 2011-09-21 | 中国科学院电子学研究所 | Method for realizing multi-source data accurate time alignment by utilizing PPS (Pulse Per Second) signal of GPS (Global Positioning System) |
CN103616710A (en) * | 2013-12-17 | 2014-03-05 | 靳文瑞 | Multi-sensor combined navigation time synchronizing system based on field programmable gate array (FPGA) |
CN104319897A (en) * | 2014-11-12 | 2015-01-28 | 天津瑞能电气有限公司 | Intelligent micro-grid control system for achieving high-speed communication based on FPGA |
WO2016025287A1 (en) * | 2014-08-12 | 2016-02-18 | Google Technology Holdings Llc. | Gps time-aiding and frequency correction |
CN107014381A (en) * | 2017-06-06 | 2017-08-04 | 北京京东尚科信息技术有限公司 | PLD, DSP, integrated navigation system, data processing method and device |
-
2018
- 2018-03-29 CN CN201810273807.0A patent/CN108519610B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1749916A (en) * | 2004-09-16 | 2006-03-22 | 中国科学院电子学研究所 | Insert the method that the GPS pps pulse per second signal realizes that precise time is aimed at computing machine |
CN102193497A (en) * | 2010-03-05 | 2011-09-21 | 中国科学院电子学研究所 | Method for realizing multi-source data accurate time alignment by utilizing PPS (Pulse Per Second) signal of GPS (Global Positioning System) |
CN103616710A (en) * | 2013-12-17 | 2014-03-05 | 靳文瑞 | Multi-sensor combined navigation time synchronizing system based on field programmable gate array (FPGA) |
WO2016025287A1 (en) * | 2014-08-12 | 2016-02-18 | Google Technology Holdings Llc. | Gps time-aiding and frequency correction |
CN104319897A (en) * | 2014-11-12 | 2015-01-28 | 天津瑞能电气有限公司 | Intelligent micro-grid control system for achieving high-speed communication based on FPGA |
CN107014381A (en) * | 2017-06-06 | 2017-08-04 | 北京京东尚科信息技术有限公司 | PLD, DSP, integrated navigation system, data processing method and device |
Non-Patent Citations (2)
Title |
---|
基于ARM平台的精密时间基准测试仪数据处理模块的设计与实现;刘玮;《中国优秀硕士学位论文全文数据库工程科技II辑》;20150715;正文第2-14页 * |
基于ARM的嵌入式实时系统关键技术的研究;王帅华;《中国优秀硕士学位论文全文数据信息科技辑》;20160315;正文第12-32页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108519610A (en) | 2018-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108519610B (en) | Multi-sensor combined navigation system time synchronization and real-time data acquisition method | |
US20210218488A1 (en) | Multisensor data fusion systems and methods | |
CN104330082B (en) | A kind of MEMS/GNSS integrated navigation systems real-time data synchronization method | |
CN102866621B (en) | High-precision GPS (Global Positioning System) 1pps (1 Pulse Per Second) timer and timing method of spacecraft | |
CN110865406A (en) | Multi-sensor data synchronous processing system and method based on vehicle-mounted GPS time service system | |
CN109922260B (en) | Data synchronization method and synchronization device for image sensor and inertial sensor | |
CN111679923B (en) | Real-time communication method and system | |
CN108023658B (en) | High-precision clock synchronization time service method and device | |
CN108631900B (en) | Pre-stamping method and system of high-precision timestamp | |
CN107966723B (en) | Multi-rate multi-channel time synchronization high-speed data recording system | |
CN112653533B (en) | Intelligent time service management method for complex system | |
US9939838B1 (en) | Systems and methods for time stamping sensor data | |
CN107870652A (en) | Sensor clock method of estimation and its device | |
US20220397869A1 (en) | Method, device, equipment and storage medium for global navigation satellite system time synchronization | |
CN107352037A (en) | Acquisition device, method and the unmanned plane of camera exposure positional information | |
WO2023071489A1 (en) | Sensor data processing method, electronic device, and readable storage medium | |
US10162792B2 (en) | Method and system for high precision time synchronization | |
CN114166222B (en) | Inertial navigation time service system and method for airborne nacelle | |
US20120226468A1 (en) | Reduction of imu/ap link requirements for sdi | |
CN107168902B (en) | Method for realizing automatic identification of high-speed CAN baud rate by using DMA | |
CN115865252A (en) | High-precision GNSS time synchronization method capable of setting period | |
WO2022110280A1 (en) | Method and apparatus for updating local time, device, and storage medium | |
CN104820648B (en) | A kind of synthetic aperture radar inertial guidance data input method and input agency plant | |
CN102855172B (en) | Method for recording network card receiving time at high precision | |
CN114166223B (en) | Airborne nacelle inertial navigation time service core processing unit and processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |