The primary instrument required to test a GPS receiver is an RF vector signal generator that is capable of simulating GPS signals. This application note describes how to use the NI PXIe-5672 RF vector signal generator for this purpose. You can use this instrument with the NI GPS Simulation Toolkit for LabVIEW to generate from one to 12 simultaneous GPS satellites.
The design of a complete GPS measurement system also involves several different accessories to guarantee the best performance. For example, you can use external fixed attenuators to improve power accuracy and noise floor performance. In addition, you may need a DC blocker for some receivers, depending on whether the receiver supplies a DC bias to its direct input port. The complete GPS signal generation system is shown in Figure 1.
Figure 2. Block Diagram of GPS Generation System
You can observe in Figure 2 that up to 60 dB of external RF attenuation (padding) is often used when testing GPS receivers. Fixed attenuators provide the measurement system with at least two benefits. First, they ensure that the noise floor of the test stimulus is well below the thermal noise floor (-174 dBm/Hz). Second, you can use them to improve the power accuracy because you can calibrate signal level with a high-precision RF power meter. While only 20 dB of attenuation is required to meet the noise floor goal, you can achieve best power accuracy and noise floor performance when using 60 to 70 dB of attenuation. Table 1 lists the effect of attenuation on noise floor performance. RF power calibration is discussed in a later section.
Table 1. Comparison of Instrument Power Required for Various Attenuation
As shown in Table 1, you can use attenuation to attenuate noise, but not below the thermal noise floor of -174 dBm/Hz.
RF Vector Signal Generator
National Instruments recommends the NI PXIe-5672 vector signal generator for GPS test applications. This instrument streams GPS waveforms that are sampled at 1.5 MS/s (I/Q) from disk at a total data rate of 6 MB/s. While you can easily sustain this data rate on a PXI controller hard drive, you should use an external drive for additional storage capacity. Figure 3 shows a typical PXI system with the NI PXIe-5672.
Figure 3. PXI System with an NI PXIe-5672 Vector Signal Generator and an NI PXI-5661 Vector Signal Analyzer
With the GPS Simulation Toolkit, you can create waveforms that are up to 12.5 minutes (25 frames) in length, which is the duration of an entire navigation message. Sampled at 6 MB/s, the maximum file size is approximately 7.5 GB. Because of the waveform size, you can store all waveforms on one of several different hard disk options including the following:
- External RAID volumes such as the NI HDD-8263 and HDD-8264
- External USB 2.0 hard disk (tested with Western Digital Passport Hard Drive)
Each of these hard drive configurations is capable of supporting more than 20 MB/s of continuous data streaming. Thus, any of these options enable both simulation and record and playback of GPS signals. A later section in this paper describes how you can use a combination of simulated and recorded GPS waveforms for comprehensive characterization of GPS receiver performance.
Creating Simulated GPS Signals
Because a GPS receiver uses satellite message data to obtain almanac and ephemeris information, this information is required for simulation of GPS signals as well. Supplied as a text file, almanac and ephemeris data provides information about satellite location, altitude, health, and orbit patterns. In addition, you can use the waveform creation process to select custom parameters such as time of week (TOW), location (longitude-latitude-altitude), and simulated receiver velocity. Based on this information, the toolkit automatically selects up to 12 satellites, calculates all Doppler shift and pseudorange information, and produces the resulting baseband waveform. To help you get started, sample almanac and ephemeris files are included in the toolkit installer. In addition, you can download them directly from the following sites:
With custom almanac and ephemeris files, you can create GPS signals from specific dates and times going back several years. When selecting these files, it is important to choose files that correspond to the same date. In general, almanac and ephemeris information is updated daily, and files from the same day should be used when choosing a specific date and time. Note that ephemeris files are often downloaded in a compressed *.Z format. Thus, you must extract the file with an unzip utility before using it with the GPS Simulation Toolkit.
Using the GPS Simulation Toolkit in “automatic mode,” where Doppler and pseudorange information is programmatically calculated, covers most GPS simulation use cases, but you can also use the toolkit in manual mode to specify each satellite’s information independently. Table 2 shows the available input parameters for both modes of operation.
1LLA (longitude, latitude, altitude)
Table 2. Default Values for Automatic and Manual GPS Simulation Toolkit Mode
Note the GPS time of week is automatically coerced by the GPS Simulation Toolkit to a range of possible values specified by the ephemeris file. Thus, if a chosen value is out of range of the given ephemeris file, the GPS Simulation Toolkit automatically selects the next-closest possible value and reports a warning to the user. You can use an example program, “niGPS Write Waveform To File,” to create GPS baseband waveforms (automatic mode). Figure 4 shows the front panel.
Figure 4. You can create GPS test waveforms with a simple example program.
The specific measurements you choose determine the type of GPS test file that you create. For example, when measuring receiver sensitivity, you should use a single-satellite simulation. On the other hand, measurements that require a position fix (such as TTFF and position accuracy) require you to use a GPS signal that simulates multiple satellites. Because of this, the GPS Simulation Toolkit includes example programs for both single-satellite and multiple-satellite simulations.
Recording GPS Signals Off the Air
One increasingly common method of creating GPS waveforms is by recording them off the air. In this scenario, signals are recorded with a vector signal analyzer (such as the NI PXI-5661) and the recorded data is generated with a vector signal generator (such as the NI PXIe-5672). Because recording GPS signals enables you to capture real-world signal impairments, you can use signal playback to observe how the receiver will perform in its deployment environment.
You can record GPS signals off the air in a fairly straightforward manner. In an RF recording system, appropriate antennas and amplifiers are combined with a PXI vector signal analyzer and hard disk to capture up to several hours of continuous data. For example, a 2 TB RAID (redundant array of inexpensive disks) is capable of recording up to 25 hours of GPS waveform. In the following sections, explore how to configure an appropriate RF front end for an RF record and playback system.
Each type of wireless communications signal has different requirements for bandwidth, center frequency, and required gain. In the case of GPS, the essential requirement is to record 2.046 MHz of RF bandwidth at a center frequency of 1.57542 GHz. Based on the bandwidth requirements, the sample rate must be at least 2.5 MS/s (1.25 x 2 MHz). Note that the 1.25 multiplier is based on the filter roll-off of the PXI-5661 DDC (digital downconverter) at the decimation stage.
In the tests described below, a sample rate of 5 MS/s (20 MB/s) was used to ensure the entire bandwidth was captured. Because you can achieve data rates of 20 MB/s or more with standard PXI controller hard drives, it is not necessary to use an external RAID volume to stream GPS signals to disk. However, National Instruments recommends using an external hard disk for two reasons. First, you can increase overall storage capacity and record multiple waveforms. Second, the use of external hard disks does not introduce undue stress on the hard drive of the PXI controller. In the tests described below, a USB 2.0 external hard disk was used. This drive, a 320 GB Western Digital Passport, operates at a disk speed of 5400 rpm. During this testing, typical read and write speeds were on the order of 25 to 28 MB/s. Thus, you can use it for both simulated (6 MB/s) and recorded (20 MB/s) GPS waveform data streaming.
The trickiest aspect of recording GPS signals is selecting and configuring the appropriate antenna and low-noise amplifier (LNA). Observe that with a typical passive patch antenna, the typical peak power in the L1 GPS band ranges from -120 to -110 dBm (the tests showed power at -116 dBm). Because the power level of GPS signals is so small, significant amplification is required to ensure that the vector signal analyzer can capture the full dynamic range of the satellite signals. While there are several ways to apply the appropriate level of gain to the signal, you can achieve the best results when using an active GPS antenna with the NI PXI-5690 preamplifier. With two cascaded LNAs, each providing 30 dB of gain, the total gain applied is 60 dB (30 + 30). Thus, the resulting peak power observed by the vector signal analyzer is increased from -116 to -56 dBm. An example system using this configuration is shown in Figure 5.
Figure 5. GPS receivers implement cascaded LNAs.
Note that one essential requirement of the recording system is the active GPS antenna. An active GPS antenna combines a patch antenna and an LNA into a single package. These antennas typically require a DC bias voltage of 2.5 to 5 V, and you can easily purchase them off-the-shelf for about $20 USD. For simplicity, use one with an SMA connector. The following section shows how the noise figure of the first LNA in an RF front end is crucial to ensuring that the recording instrumentation adds as little noise as possible to the off-the-air signal. Also note that the vector signal analyzer shown in Figure 5 is a simplified diagram. The actual PXI-5661 is a three-stage super-heterodyne vector signal analyzer that is slightly more complex than the illustration in Figure 5.
When you apply 60 dB to the off-the-air signal, you should observe the peak power in the L1 at about -60 to -50 dBm. If you configure the vector signal analyzer in swept spectrum mode to analyze the entire spectrum, note that the power in bands outside the L1 band (FM and cellular) rise to power levels that are actually higher than the GPS signal. However, the peak power of out-of-band signals does not typically exceed -20 dBm, and is filtered by one of the vector signal analyzer's several bandpass filters. One of the easiest ways to verify that the RF front end of the recording device is sufficient is by opening the RFSA demo panel example program. Using this program, you can visualize the RF spectrum at the L1 GPS band. A typical view of the spectrum is shown in Figure 6. Note that this spectrum screenshot was taken outdoors at the GPS center frequency. An active GPS antenna and PXI-5690 preamplifier were used to apply a combined total of 60 dB of gain.
Center Frequency: 1.57542 GHz
Span: 4 MHz
RBW: 10 Hz
Averaging: RMS, 20 Averages
Figure 6. GPS is visible only in the spectrum with a narrow RBW.
Using an RF record and playback NI LabVIEW example program discussed earlier, configure the reference level to -50 dBm, the center frequency to 1.57542 GHz, and the I/Q sample rate to 5 MS/s. A front panel of a configured example is shown in the Figure 7.
Figure 7. Front Panel of RF Record and Playback Example
The maximum recording duration of a GPS signal depends on the sample rate and the maximum storage capacity. Using a 2 TB RAID volume (the largest addressable disk size in Windows XP), you can record signals at 5 MS/s for up to 25 hours.
Configuring the RF Front End
With cascaded LNAs providing 60 dB of gain, you significantly increase the power at the front end of the vector signal analyzer. From your measurement, 60 dB of gain was enough to increase the peak power from -116 dBm to -56 dBm. Note that with 60 dB of gain applied (and a 1.5 dB noise figure), the noise power of the signal is –112 dBm/Hz (-174 + Gain + F). The maximum obtainable signal-to-noise ratio (SNR) of the signal, 56.5 dB (-56 dBm +112.5 dBm), is less than the dynamic range of the instrument, so you can be sure that with 80 dB of dynamic range, your vector signal analyzer can record the maximum possible SNR without introducing noise in the off-the-air signal.
When recording any signal off the air, it is a good practice to set the reference level at least 5 dB above the typical peak power to account for any signal strength anomalies. While this reduces the effective dynamic range of the vector signal analyzer in some cases, GPS signals are unaffected by this technique. Because the maximum theoretical SNR of a GPS signal at the antenna input is 58 dB (-116 + 174), you gain no advantage by recording more than 58 dB of dynamic range at the vector signal analyzer. Thus, you can essentially “throw away” 10 dB or more of your instrument’s dynamic range without affecting the quality of the recorded signal (at this bandwidth, the PXI-5661 has a dynamic range of better than 75 dB).
With the reference level appropriately set, you need to properly configure the RF front end of the recording device. As previously mentioned, you can achieve the best RF recording results using an active GPS antenna. While the active antenna uses a built-in LNA to provide up to 30 dB of gain with a low noise figure, you must also supply it with a DC bias. Several biasing methods are described below.
Method 1: Active Antenna Powered by GPS Receiver
The first method to power an active antenna is with a DC bias "T." Using this component, a DC signal (3.3 V in this case) is applied to the DC port of the bias T, which applies the appropriate DC offset to the active antenna. Note that the precise DC voltage you should apply depends on the DC power requirements of the active antenna. A diagram illustrating the connections is shown in Figure 8.
Figure 8. You can use a DC bias "T" to power an active GPS antenna.
Observe in Figure 8 that you can use an NI PXI-4110 programmable DC power supply to supply the DC bias signal. While you can use many off-the shelf power supplies (including many less expensive ones) for this application, the PXI-4110 was used in this case as a matter of convenience. Also, you can use a generic off-the-shelf bias T that is operational up to 1.58 GHz, but the one used in this experiment was purchased from www.minicircuits.com.
Method 2: Active GPS Antenna Powered by Receiver
A second method that you can use to power the active GPS antenna is with the receiver itself. Most off-the-shelf GPS receivers use a single port to power an active GPS antenna, and this port is already biased with an appropriate DC signal. By combining an active GPS receiver with a splitter and DC blocker, you can power an active LNA and simply record the signal observed by the GPS receiver. A diagram of the appropriate connections is shown in Figure 9.
Figure 9. With a DC blocker, you can record and analyze the GPS signal.
Figure 9 shows how you can use DC bias from the GPS receiver to power the LNA. Note that method 2 is particularly useful for drive tests because you can observe the receiver’s characteristics such as velocity and dilution of precision while recording.
Cascaded Noise Figure Calculations
To calculate the total noise that is added to the recorded GPS signal, you can simply determine the noise figure for the entire RF front end. As a matter of principle, the noise figure of the entire system is always dominated by the first amplifier in the system. Think of noise figure as the ratio of SNRin to SNRout (see Noise Figure for measurement techniques) through any RF component or system. When recording GPS signals, it is necessary to determine the noise figure of the entire RF front end.
When performing a cascaded noise figure calculation, you first convert each noise figure and gain to its linear equivalent, which is called the "noise factor." When calculating the noise figure for a system with cascaded RF components, you can first determine the system noise factor and then convert to noise figure. Thus, you must calculate system noise figure using the following equation:
Equation 2. Noise Figure Calculation for Cascaded RF Amplifiers 
Note that both noise factor (nf) and gain (g) are shown in lowercase because they are linear and not logarithmic relationships. Thus, you also introduce the conversion from linear to logarithmic gain and noise figure (and vice versa) in the equations below:
Equations 3 through 6. Conversions between Linear and Logarithmic Gain and Noise Figure 
An active GPS antenna using a built-in LNA typically provides 30 dB of gain while introducing a noise figure usually on the order of 1.5 dB. During the second stage of the recording instrumentation, the PXI-5690 provides 30 dB of additional gain as well. Though its noise figure is higher (5 dB), the second amplifier introduces little noise into the system. As an academic exercise, you can use equation 2 to calculate the noise factor for the entire RF front end of the recording instrumentation. Gain and noise figure values are expressed in Table 3.
Table 3. Noise Figure and Factors of the First Two Components of the RF Front End
According to the calculations above, you can determine the overall noise factor for the receiver:
Equation 7. Cascaded Noise Figure for an RF Recording System
To convert noise factor into a noise figure (in dB), you apply Equation 3 to yield the following results:
Equation 8. The noise figure of the first LNA dominates the noise figure of the receiver.
As Equation 8 illustrates, the noise figure of the first LNA (1.5 dB) dominates the noise figure of the entire measurement system. Thus, with the vector signal analyzer configured so that the noise floor of the instrument is less than that of the input stimulus, your recording introduces only 1.507 dB of noise to the off-the-air signal.
Talking to the GPS Receiver
While many receivers may use proprietary software that enables the user to visualize information such as longitude and latitude, a more standardized approach is required for automated measurements. Fortunately, you can configure a wide variety of receivers to talk to a PXI controller through a protocol known as NMEA-183. In this case, the receiver continuously sends commands through either a serial or USB cable. In LabVIEW software, you can parse all commands to return satellite and position fix information. The NMEA-183 protocol supports six basic commands, and each provides unique information. These commands are described in Table 4.
Table 4. Overview of Basic NMEA-183 Commands
For practical testing purposes, the GGA, GSA, and GSV commands are the most useful. More specifically, you can use information from the GSA command to determine whether the receiver has achieved a position fix and is used in TTFF measurements. When performing sensitivity measurements, use the GSV command to return C/N (carrier-to-noise) ratios for each satellite that you are tracking.
This application note does not describe the NMEA-183 protocol in great depth, but you can find all command information at various Web sites such as www.gpsinformation.org/dale/nmea.htm#RMC. In LabVIEW, you can parse these commands using the NI-VISA driver.
Figure 10. LabVIEW Example Using NMEA-183 Protocol