1

I'd like to know how synchronization between the GPS unit and any other sensors is done in a typical system. I understand that the 1PPS signal plays an important role.

Could anyone give me a very simple explanation of the 1PPS signals role?

David
  • 4,504
  • 2
  • 25
  • 44
user3506463
  • 69
  • 2
  • 9

2 Answers2

4

PPS is not a fundamental function of GPS receivers. It is a axillary function that a GPS receiver can provide from it's internal timing systems that are used for actually measuring GPS position.

However, in many contexts, having a very precise local timestamp is highly beneficial. It is these applications where the PPS output is helpful.

Take a example where you have two sensor systems, perhaps a mile or two apart. They're going to have separate local clock oscillators, which will have different drift rates. The PPS signal, referenced to the GPS timestamp, is extremely useful for providing a way to accurately determine timing between the two systems. The GPS system compensates for the transmission time between each receiver and the GPS sattelite, so the PPS signals can be said to occur "simultaneously" to a considerable degree of precision, sometimes greater then the actual time-of-light transit between their positions!

For example, the LEA-6T timing GPS has a RMS time-pulse (e.g. PPS) output accuracy of 30 nanoseconds. Critically, that timing accuracy is position invariant compared to a theoretical global GPS time-base.

Note that this has fun effects like making the effects of the theory of relativity important to measurements. Light travels ~11.8" per nanosecond, but the GPS PPS output has a functionally infinite propagation speed, as all PPS pins theoretically would go high within the error band (~30 nanoseconds), invariant of their physical distance.

This works because the PPS output is not driven by an external pulse, but rather an internal clock that is adjusted to account for distance from the GPS sattelites, so each GPS receiver independently maintains it's own timebase, and the system conspires to make each discrete timebase phase and frequency align with each other.


Edit: You are asking about inertial measurement and navigation systems? If you're asking for the role of a PPS signal in something like a IMU, there isn't one. It's not used, except perhaps for setting the clock of the IMU's output timestamps (if it has timestamps).

To be clear, GPS systems are a critical component of many IMU systems, but the IMU uses the position output of the GPS, not the precision timing output.

Connor Wolf
  • 31,938
  • 6
  • 77
  • 137
  • @Conner Wolf thank you very much, probably only for timestamps they use, in this way inertial sensors are synchronized with GPS. – user3506463 Sep 25 '14 at 07:24
  • @user3506463 - Well, the GPS *position* output is absolutely critical in many high-precision IMU systems. The **PPS output** is not. – Connor Wolf Sep 25 '14 at 07:26
  • Exactly! what I am looking for is synchronizing the accelerometer and gyrosocope with GPS and combining them in a way that during the time that GPS for any reasons is disturbed or is not available accelerometer can give us information about the speed and direction as an example. – user3506463 Sep 25 '14 at 07:29
  • @user3506463 - You're basically describing a GPS-assisted IMU, which is a very common thing. You're going to want to filter your GPS position fix together with the IMU output with a [Kalman filter](http://en.wikipedia.org/wiki/Kalman_filter). – Connor Wolf Sep 25 '14 at 07:34
  • Almost, im working more on the crash cases, but it will perform like what you explained in normal driving patterns. For this it's very important that sensors are well synchronized with GPS, which you know there is always a time delay. I read more about GPS and i thought maybe PPS could be useful for this case. – user3506463 Sep 25 '14 at 07:41
  • @user3506463 - It might let you calculate how long the delay is, but I don't think you're going to be able to remove it. – Connor Wolf Sep 25 '14 at 07:52
  • Thank you very much for your help and great answers @Conner Wolf – user3506463 Sep 25 '14 at 07:54
  • Typically the PPS output is driven by a RTC clock independent of the GPS fix. That means when the device is first turned on, you can get a 1 sec sync pulse without a GPS fix. When the fix comes around, it calibrates the PPS to be in sync with the PPS. So you always get a sync pulse, and it's usually tied to GPS timing but still goes when theres no GPS fix. – Oliver Sep 25 '14 at 07:56
  • @Oliver - That depends heavily on the GPS. Some output PPS when there is no satellite signal, some do not, and some are configurable. The PPS signal is not a GPS-Lock signal. – Connor Wolf Sep 25 '14 at 07:58
  • @ConnorWolf You are right, it is perhaps a bit presumptions to assume that's the case for all GPS devices. Just seems to be a pattern with the ones I've seen. Very useful if implemented like that though. – Oliver Sep 25 '14 at 08:04
2

It's a little odd that you accepted Connor Wolf's answer so quickly, considering that he didn't actually answer your direct question.

There are times when the tight synchronization of the sampling of other sensors to the GPS 1PPS output is required. For example, I have worked on high sample rate precision inertial navigation systems (200 Hz output and up) in which the raw accelerometer and gyro samples needed to be timestamped with accuracies on the order of 0.1 ms or better.

Also, keep in mind that the position that the GPS receiver outputs is its position at the leading edge of the 1PPS pulse, not its position at the time the message comes out (which might be a variable time later). In applications with high dynamics, the difference is crucial.

I have taken a couple of different approaches to incorporating the 1PPS pulse into the systems I've worked on. In the first iteration, I was using an FPGA to implement most of the system glue logic, so I included a 20-MHz VCXO in the PCB design. Logic in the FPGA phase-locked this VCXO to the 1PPS pulse, and then I was able to derive all kinds of precision phase-aligned clocks from the divider chain driven by the VCXO, including 10 kHz, 200 Hz and a "replica" 1 PPS.

In another implementation, I had no FPGA or VCXO; in order to reduce cost, the system was entirely implemented on a Blackfin DSP chip, using its on-chip peripherals, and the fixed (but uncalibrated) CPU clock as a timebase. For this system, I developed a "virtual timebase" based on using a couple of the Blackfin's hardware timer modules, one to generate periodic timing interrupts at 10 kHz, and the other to measure the period and the phase of the 1PPS signal from the GPS receiver relative to those interrupts. The firmware (primarily implemented in the interrupt handlers for the two timers) adjusts the period of the first timer to keep its interrupts phase-aligned with the 1PPS reference, even if the CPU clock frequency drifts.

With either of these timebase implementations, it is easy to either create synchronization pulses for the other sensors on the platform, or to timestamp their outputs if they can't be synchronized.

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
  • In the morning I was very confused & the explanations of Conner was really useful for me to figure out the concept and the role of 1PPS. I did a test already and noticed that in the cases of hard braking ( as an example) the velocity due to acceleration gets zero earlier than the velocity given by GPS. I was wondering if this is the case of time delay. By studying and searching more I noticed that 1PPS is playing an important role in timing and synchronization. However, by what you mentioned and also the company replied me, the time delay may vary. – user3506463 Sep 25 '14 at 12:20
  • Agreed, actually with your comment about the leading edge and the position output I've measured jitter of over 100ms even with very expensive receivers (ie that cost thousands). – PeterJ Sep 25 '14 at 12:22
  • @PeterJ to be honest with you, I got more, around 400 ms! – user3506463 Sep 25 '14 at 13:00