[15]
Processing is split between FPGA and Pi by complexity and urgency. The Pi handles math-intensive heavy-lifting at its own pace. The FPGA synthesizes the first local oscillator, services high-priority events in real-time and tracks satellites autonomously. The Pi controls the FPGA via an SPI interface. Conveniently, the same SPI is used to load the FPGA configuration bitstream and binary executable code for the embedded CPU. The FPGA can also be controlled via a JTAG cable from a Windows PC and auto-detects which interface is in use. [15:0,31:16] L1 frequencies are down-converted to a 1st IF of .6 MHz by mixing with aMHz local oscillator on the “GPS3” front-end board. All subsequent IF and baseband signal processing is done digitally in the FPGA. Two proportional-integral (PI) controllers per satellite, track carrier and code phase. NAV data transmitted by the satellites is collected in FPGA memory. This is uploaded to the Pi, which checks parity and extracts ephemerides from the bit stream. When all required orbital parameters are collected, a snapshot is taken of certain internal FPGA counters, from which time of transmission is computed to ± 17 ns precision. Much of the (****************************************************************************************************************************************************************************. MHz synthesizer is implemented in the FPGA. One might expect jitter problems, co-hosting a phase detector with other logic, but it works. Synthesizer output spectral-purity is excellent, even though the FPGA core is toggling away furiously and not all on harmonically-related frequencies. This approach was taken because a board similar to “Frac7” already existed from an earlier synthesizer project. Adding a front-end was the shortest route to a prototype receiver. But that first version was not portable: it had inconvenient power requirements and no on-board frequency standard. Front-endSignal processing up to and including the hard-limiter: [15:0,31:16] ********** [15:0,31:16] ************************** The LMH 10000 comparator has a maximum input offset voltage of 9.5mV. Amplified thermal noise must comfortably exceed this to keep it toggling. Weak GPS signals only influence the comparator near zero crossings! They are “sampled” by the noise! To estimate noise level at the comparator input we tabulate gains, insertion losses and noise figures: (************************************** LNA [31:0] **************************** SAW [31:0] **************************** Coax [31:0] ****************************
(**************************************** [15:0] In-band noise at the mixer output is – 0.8 31 – 1.5-3.9 – 6 log (2.5e6)=- (dBm or************************************************************************************************************************************************************************************************************************************ RV RMS. The mixer is resistively terminated in 52 – ohms and the stages thereafter work at higher impedance. The discrete IF strip has an overall voltage gain of so the comparator input level is 52 mV RMS. The LMH 10000 adds 60 dB of gain making a total of dB for the whole IF. Deploying so much gain at one frequency was a risk. To minimise it, balanced circuitry over a solid ground plane was used and screened twisted-pair carries the output to the FPGA. The motivation was simplicity, avoiding a second conversion. In practice, the circuit is stable, so the gamble paid-off. (********************** [1] (************************* Active decoupler Q1 supplies 5V for the remote LNA. MMIC amplifier U2 provides 21 dB gain (not at IF!) and ensures low overall system noise figure, even if long antenna cables are used. L1 and L2 are hand-wound microwave chokes with very high self-resonant frequency, mounted perpendicular to one another and clear of the ground plane. Wind Wind ********************************************************************************************************************************************************************************************************************************** turns, air-cored, 1mm inside diameter from 7cm lengths of 32 swg enameled copper wire. Checked with the tracking generator on a Marconi 3000 SA, these were good to 4 GHz. The Mini-Circuits MBA – L DBM was chosen for its low 6 dB conversion loss at 1.5 GHz and low 4 dBm LO drive requirement. R9 terminates the IF port. Three fully-differential IF amplifier stages follow the mixer. Low-Q parallel tuned circuits strung between collectors set the -3 dB bandwidth around 2.5 MHz and prevent build-up of DC offsets. L4, L5 and L6 are screened Toko 7mm coils. The BFS was chosen for its high (but not too high) 1 GHz f T [15:0,31:16] ********************************. I (e) *********************************** is 2mA for lowest noise and reasonable βr |
(********************************************. The (************************************************************************************************************************************************************************************************************************************************************************. 6 MHz 1st IF is digitally down-converted to 2.6 MHz by under-sampling at 11 MHz in the FPGA. 2.6 MHz lies close to the center of the 5 MHz Nyquist bandwidth. It is best to avoid the exact center, for reasons that will be explained later. Several other first IF frequencies are possible: 28 .5 MHz, which produces spectrum inversion at the 2nd IF, has also been tried successfully. There is a trade-off between image problems at lower and available BFS gain at higher frequencies. (SearchSignal detection entails resolving three unknowns: what satellites are in view, their Doppler shifts and code phases. A sequential search of this three-dimensional space from a so-called “cold start” could take many minutes. A “warm start” using almanac data to predict positions and velocities still requires a code search. All code phases must be tested to find the maximum correlation peak. Calculating correlation integrals in the time-domain is very expensive and redundant . This GPS receiver uses an FFT-based algorithm that tests all code phases in parallel. From cold, it takes 2.5 seconds on a 1.7 GHz Pentium to measure signal strength, Doppler shift and code phase of every visible satellite. The Raspberry Pi is somewhat slower.With over-bar denoting conjugation, the cross-correlation function y (Τ) of complex signal s (t) and code c (t) shifted by offset Τ is: (********************************************* (**********************
(The Correlation Theorem) states that the Fourier transforms of a correlation integral is equal to the product of the complex conjugate of the Fourier transform of the first function and the Fourier transform of the second function: FFT (y)=CONJUGATE (FFT (s)) * FFT (c) (************************************************** Correlation is performed at baseband. The 1. (Mbps C / A code is chips or 1ms long. Forward FFT length must be a multiple of this. Sampling at (MHz for 4 ms results in an FFT bin size of 250 Hz. 42 Doppler shifts must be tested by rotating the frequency domain data, one bin at a time, up to ± bins=± 5 KHz. Rotation can be applied to either function. [1] The (************************************************************************************************************************************************************************************************************************************************************************. 6 MHz 1st IF from the 1-bit ADC is under-sampled by a 11 MHz clock in the FPGA, digitally down-converting it to a 2nd IF of 2.6 MHz. In software, the 2nd IF is down-converted to complex baseband (IQ) using quadrature local oscillators. For bi-level signals, the mixers are simple XOR gates. Although not shown above, the samples are temporarily buffered in FPGA memory. The Pi is not able to accept them at Mbps. 1. Mbps and 2.6 MHz are generated by numerically-controlled-oscillator (NCO) phase accumulators. These frequencies are quite large compared to the sampling rate, and are not exact sub-harmonics of it. Consequently, the NCOs have fractional spurs. The number of samples per code chip dithers between 9 and 11. Fortunately, DSSS receivers are tolerant of narrow-band interferers, external or self-generated. Complex baseband is transformed to the frequency domain by a forward FFT which need only be computed once. An FFT of each satellite’s C / A code is pre-computed. Processing time is dominated by the inner-most loop which performs shifting, conjugation, complex multiplication and one inverse-FFT per satellite-Doppler test. The Raspberry Pi’s Videocore GPU could be leveraged to speed things up. At (MHz sampling rate, code phase is resolved to the nearest 103 ns. Typical CCF output is illustrated below: (*********************************************[15] ************************ (********************************************** Calculating peak to average power over this data gives a good estimate of SNR and is used to find the strongest signals. The following were received at (**************************************************************************************************************************************************************************************************************************************************************************: 16 GMT on 4 March in Cambridge, UK with the antenna on an outside North-facing window ledge: (PRN) ************************************** (NAVSTAR) ************************************Doppler (Hz)
9) *******************************************************************************************************************************************************************************************************************************************************************************
22
GIPHY App Key not set. Please check settings