0
$\begingroup$

I am using four HackRF One devices that will be situated ~1000ft apart, and that must be synchronized. Running 4000ft of cable to connect their clocks is obviously not feasible. I am wondering what sort of solutions are available for synchronizing their clocks through wireless means. I have done some research on this, but all I could find was a method using GPS, which required hardware mods. I would like to avoid modding if possible. These HRF's will also be connected to Raspberry Pi's with internet access. Perhaps there is a way to use internet time servers to sync them? They all operate at 10MHz, just need phase alignment.

Edit: I am trying to locate some transmitters using time difference of arrivals. So highly accurate event timing is necessary. If any other SDRs besides the HackRF would be more suitable I'm open to switching over to something else if necessary.

$\endgroup$
  • 2
    $\begingroup$ You'll need to define "synchronized". In what aspects, to which precision for how long? $\endgroup$ – Marcus Müller Aug 13 at 7:35
  • 2
    $\begingroup$ most importantly, this really sounds like an XY Problem. It'll probably (I can almost promise!) be easier to give you good answers once you tell us the purpose of all this. $\endgroup$ – Marcus Müller Aug 13 at 7:37
  • 2
    $\begingroup$ As far as I know, the HackRF doesn't have an internal notion of "wall clock" time, and hence, you can't time-synchronize the devices themselves. Also, the accuracy you get over NTP is pretty insufficient, unless you need to find really large objects in really empty deserts. So, you'd need an external reference signal. Can you pick up a common broadband signal with a transmitter at a known location? For example, a TV transmitter that all receivers can receive? $\endgroup$ – Marcus Müller Aug 13 at 17:54
  • 1
    $\begingroup$ Just plug antennas to the clock in and out ports? No. You'd just use the information gathered through analysing the received signal to calculate each receiver's frequency, phase and clock offset. And then account for these in software. (i.e. correct them mathematically in softwarer) $\endgroup$ – Marcus Müller Aug 13 at 19:19
  • 1
    $\begingroup$ Regarding your comment below, couldn't the GPS signal serve as a reference signal as well? Reference for what? the HackRF has no notion of time. $\endgroup$ – Marcus Müller Aug 13 at 19:19
3
$\begingroup$

If you're using four independent GPS receivers as your time synchronisation source, you may be able to feed some version of the GPS 1PPS signal into the receiver, and recover it later in the data.

It's possible to synchronise two A/Ds, usually by time tagging the samples and resetting the counter in the FPGA using an external sync signal like GPS, but this requires support in hardware and gateware. Fancier A/D converters have a secondary 1-bit A/D that's completely synchronised with the main sampler, for this exact purpose. I don't know the HackRF but you say it requires a hardware modification.

Feeding the time signal into the front end simplifies all that, if you can tolerate some occasional interference. A CW tone or noise source, switched on for a very short time by the 1PPS, would be one kind of signal you could use. I've also had some success simply passing the pulse through a high-pass filter and detecting the resultant small RF burst - this depends on the rise time of the PPS and the frequency and bandwidth of your receiver.

If your receivers are only 1000' apart, GPS probably won't be good enough for good TDOA. Off the shelf modules probably don't do better than a few hundred nanoseconds time error from each other, depending on your luck and the ionosphere, and your baseline is only 1000 ns long, so the position errors will be large. The uBlox F9T can apparently be set up to share clock data between receivers in real time, to offer a claimed 15 ns time offset between receivers, this might work better.

If the space between the receivers is clear, the idea in the comments might be simplest - place a transmitter at a known position, compute its time offset to each receiver, and use this to find the offset of a signal from an unknown position.

$\endgroup$
  • $\begingroup$ So basically my receivers will be far enough apart that the GPS signals will arrive at different times and thus not be a good source? $\endgroup$ – Pizza Receptacle yesterday
  • $\begingroup$ No, I'm saying that for a 1000 foot baseline, GPS timing might not be good enough. It's used extensively for larger areas, like lightning detection, TDOA location of aircraft, etc, but in your case the error bar might be too large. Test it first - run a couple of GPS receivers against each other and look at the spread in PPS times. $\endgroup$ – tomnexus yesterday
2
$\begingroup$

First synchronize all 4 clock generators in frequency using an external source (say, GPS or atomic clock derived into the 10MHz ref input). Start receiving continuously on all 4, and use the received sample counts as your Raspberry Pi timer time bases.

Second, place a reference source (such as a cheap FM transmitter, FMRS, HT, et.al.) in the center of the constellation of your 4 radios. Record some transmission (you saying "hello") in all 4 receivers. Find the peak cross-correlation time-stamp for each pair of receivers and use these cross-correlation time lags to adjust a sample count offset in the time stamps of each unit until all 4 cross-correlation lags between units go to zero (or sub-1-sample).

$\endgroup$
1
$\begingroup$

Synchronizing clocks without wires usually involves radio. But since you're building a radio, "just use a radio" is probably not a useful solution.

Unfortunately, it's unlikely NTP (the most common protocol for synchronizing time over IP) is able to provide sufficient precision to keep the receiver's phase coherent enough to be useful. The jitter in network delay and even Raspberry Pi processing is simply orders of magnitude too great.

GPS is probably the best option. You don't necessarily have to modify the hardware: the HackRF One has a clock input that expects a 10 MHz reference signal. And there are external devices that generate the 10 MHz reference from GPS for precisely this purpose. You just need two such devices, and a clear(ish) view of the sky.

$\endgroup$
  • 2
    $\begingroup$ problematic is that OP wants the radios to have "event time" synchronization, not frequency and phase synchronization – a feature that the HackRFs don't possess themselves. $\endgroup$ – Marcus Müller Aug 13 at 18:11
  • $\begingroup$ If these reference devices are far enough apart will it reduce phase alignment though? $\endgroup$ – Pizza Receptacle yesterday

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.