Signal Hound BB API
Sweep Mode

Swept spectrum analysis represents the common spectrum analyzer measurement of plotting amplitude over frequency. In this measurement mode, the API returns sweeps from the receiver. The API provides a simple interface through smGetSweep for acquiring single sweeps, or for high throughput sweep measurements, the smStartSweep / smFinishSweep functions. Both the sweep format and acquisition methods are described below. Only 1 sweep configuration can be active at a time. Changing any sweep parameter requires reconfiguring the device with a new sweep configuration.

Sweep Format

Sweeps are returned from the API as 1-dimensional arrays of power values. Each array element corresponds to a specific frequency. The frequency of any given can be calculated as

‘Frequency of N^’ th sample in sweep=StartFreq+N*BinSize`

where StartFreq and BinSize are reported in the #smGetSweepParameters function.

Min and Max Sweep Arrays

Several functions in the SM API return two arrays for sweeps. They are typically named sweepMin and sweepMax. To understand the purpose of these arrays, it is important to understand their relation to the analyzer’s detector setting. Traditionally, spectrum analyzers offer several detector settings, the most common being peak-, peak+, and average. The SM API reduces this to either min-max or average. When the detector is set to min-max, the sweepMin array will contain the sweep as if a peak- detector is running, and the sweepMax array will contain the sweep of a peak+ detector. When average detector is enabled, sweepMin and sweepMax will be identical arrays.

Sweeps are returned for swept analysis and real-time spectrum analysis. Generally, if you are not interested in either the min or max sweep, simply passing a NULL pointer for this parameter will tell the API you wish to ignore this sweep.

Most API users will only be interested in the sweepMax array as this will provide peak+ and average detector results. (pass NULL to the sweepMin array parameter)

Blocking vs. Queued Sweep Acquisition

The simple method of acquiring sweeps is to use the smGetSweep function. This function starts a sweep and blocks until the sweep is completed. This is adequate for most types of measurements but does not optimize for receiver sweep speed. USB latency can be very large compared to total acquisition/processing time. To eliminate USB latency, you will need to take advantage of the API sweep queuing mechanisms.

The sweep start/finish function provide a way to eliminate USB latencies between sweeps which allows the device to sustain the full sweep speed throughput. Using the #smStartSweep/#smFinishSweep functions you can start up to ‘N’ sweeps which ensures the receiver is continuously acquiring data for the next sweep. Using a circular buffer approach, you can ensure that there is no down time in sweep acquisition. See an example of this in the provided code examples.

Note: When using the blocking #smGetSweep function, the API utilizes the queued start/finish functions with a sweep index of zero (0). This means that if you want to mix the blocking and queue sweep acquisitions, avoid using index zero for queued sweeps.

Sweep Speed

This sweep speed is related to the parameter set in smSetSweepSpeed. See the description for smSetSweepSpeed for more information.

The SM has 3 sweeps speeds depending on the user’s configuration. The sweep speed is primarily set by the user explicitly, except in a few cases. The user can also configure the API to automatically choose the fastest sweep speed. The sweep speeds are described below.

  • Slow/Narrow – For spans below 5MHz, the API will perform sweeps in a way to achieve lower RBW/VBWs. The sweep is accomplished by dwelling at a LO frequency. This is necessary for the low RBWs that accompany the narrow spans. The API will use this sweep speed below 5 MHz regardless of the users sweep speed selection.
  • Normal – At this speed the SM steps the LO in 39.0625MHz steps. This mode offers better RF performance than fast sweep mode, with a sweep speed reduction of about 3X.
  • Fast – At this speed, the SM steps the LO in 156.25MHz steps to accomplish up to a 1THz sweep speed. There are additional restrictions that hold when utilizing the fast sweep. The max FFT size is 16K which limits RBW to about 30-60kHz depending on the spectrum window selected. Additionally, VBW and sweep time are not selectable when measuring at the fast sweep rate.