# The Lab Presets ← [Back](README.md) sdrtop's **lab presets** are the bench-engineer views: instead of just a live spectrum, they surface the measurements sdrtop can derive about your receiver's *signal quality* and *hardware health*. They're built for setting up a clean capture and watching for trouble during a long run. The measurements are split across four focused presets, each on its own number key: | Key | Preset | Focus | |-----|--------|-------| | `5` | **Lab IQ** | IQ diagnostics + constellation + spectrum | | `6` | **Lab RF** | RF front-end bench: diagnostics + level diagram + ADC loading | | `7` | **Lab Timing** | stream-timing diagnostics + hardware vitals | | `8` | **Lab Signal** | spectrum + signal metrics + waterfall | | `9` | **Lab Sweep** | frequency scanner across a band wider than one window | This guide explains each measurement below; the heading notes which preset to open for it. Every panel turns its border and title **[STALE]** when RX is not streaming, so you always know whether you're looking at live data or a frozen snapshot. > The lab panels also have a focus mode for extra actions — see [Keyboard Shortcuts](keys.md#lab-panel-focus-modes). The focus key is the highlighted letter in each panel's title. --- ## RF Front-End Bench · *Lab RF (`6`)* A three-panel bench that reads the whole receive chain as one story. The thesis it teaches: **level climbs stage by stage; the gap between signal and noise is the SNR set at the antenna; gain only positions that gap in the ADC window** — it never improves it. Each panel restates one face of that. The banner across the top sums it up: `CHAIN ANT▸LNA▸MIX▸VGA▸ADC · NF 6.0 dB · MDS −105 dBm · SNR 40 dB`, and the marker bar at the bottom reads the ADC window: `CLIP 0 dBFS · PEAK −8 dBFS · Δ headroom +8 dB · NOISE −48 dBFS · SNR 40 dB`. > **A note on the levels.** The HackRF is not power-calibrated, so the dBm figures here are *modeled / relative*: the lineup is back-computed from the *measured* ADC level through the *known* stage gains, anchored to a documented `0 dBFS = 0 dBm` reference. They're exactly right for staging decisions, and they're not a wattmeter reading. Likewise the linearity figures (below) are datasheet-anchored estimates, not lab measurements — both are labelled as such in the panel. ### RF Diagnostics *(left — focus `D`)* The chain quantified, top to bottom: - **Gain lineup** — the signal level after each stage (ANT, LNA, MIX, VGA, ADC), with each stage's gain in the middle column. You can watch the signal climb by each stage's gain and land at the measured ADC level. - **Gain staging** — LNA `n / 40` and VGA `n / 62` gradient bars (the same bars as the command rail and header), each with a `┊` tick marking the *optimal* target. The `opt` line reads `✓ at optimum` or points at the LNA/VGA the staging wants. - **Noise figure** — each stage's own NF as a bar, and the Friis **system total** beneath. The system total can sit *below* the worst single stage because the LNA's gain suppresses the noise of everything after it — that's the whole point of leading with a low-noise amplifier. - **Sensitivity** — **MDS** (Minimum Detectable Signal, `−174 dBm/Hz + 10·log₁₀(BW) + NF`) plus a noise-floor trend sparkline with its ±dB/60s spread. Narrowing the BB filter or lowering the NF improves (lowers) the MDS. - **Verdict** — a plain-language read of the staging (`WELL-STAGED`, `HOT`, `CLIPPING`, `UNDER-UTILISED`…) and the action chips `[A] auto-gain · [↑↓] LNA · [ ] VGA`. ### Gain-Staging Level Diagram *(centre)* The lineup drawn as a picture: two traces climbing the stage axis ANT▸LNA▸MIX▸VGA▸ADC — **signal** (filled) and **noise floor** (line). The vertical gap between them is the SNR. Reading it left to right shows the gap being *carried up* the chain and parked inside the ADC window, never widened. Dashed reference lines mark the ADC clip ceiling and 8-bit floor; the band between the traces is shaded as **usable dynamic range** (or, if the noise ever climbs above the signal, flagged as a **buried** band instead of left blank). ### ADC Loading *(right)* How hard the 8-bit ADC is actually driven: - **Signed sample histogram** — a centred bell from −FS to +FS. A healthy signal fills the middle without piling up on the rails; the rails turn amber, then red, as clipping appears. A lopsided bell reveals a DC offset. - **Headroom** bar — clip headroom in dB, with the optimal tick. - **Loading** — `peak` / `rms` in dBFS and ADC counts, **crest** factor, **effective bits** (ENOB), and the **clip-event** count for the window. - **Linearity** *(modeled)* — P1dB headroom, IIP3 / IMD3, and SFDR against the honest 8-bit ceiling (`6.02·8 + 1.76 ≈ 50 dB`). These need a two-tone source to measure for real; here they're gain-adjusted datasheet estimates for guidance. ### Auto-gain and freeze Focus the RF Diagnostics panel with `D`, then: - **`A` — auto-gain.** When the chain is off-optimal, one press jumps LNA/VGA to the staging target (signal ≈ −8 dBFS, no clip), filling LNA first to protect the noise figure. Once you're already at the optimum, pressing `A` again **latches a continuous auto-track** that re-nudges the gain when the level drifts (the chip lights `✓`); press once more to unlatch. Touching the gain manually (`↑↓`, `[ ]`, `a`, `r`) drops the latch immediately, so it never fights you. - **`⎵` / `F` — freeze.** Holds the histogram and level diagram on a snapshot so you can study them while RX keeps running; both panels show `[FRZ]` in their title. Press again to go live. --- ## IQ Amplitude Distribution · *optional panel (`iq_histogram`)* > In the default **Lab IQ** preset the constellation (below) now fills this slot: the same ADC data shown as a richer 2-D cloud. The histogram is still available as a panel if you want the exact Low/Mid/Clip percentages: add `iq_histogram` to a [custom layout](config.md#custom-layout-presets). A histogram of incoming sample amplitudes across 32 bins, log-scaled vertically so both rare strong peaks and the bulk of weak samples are visible at once. Colour zones: - **Dim (left)** — low amplitude. The ADC is under-utilised. - **Green (centre)** — the healthy range. - **Red (right)** — high amplitude, approaching clipping. **Numeric breakdown** — the exact percentages so you can set gain precisely: ``` Low 12% Mid 71% Clip 17% ``` **PAPR** — **Peak-to-Average Power Ratio** (crest factor) in dB, estimated from the distribution. This is a quick fingerprint of *what kind* of signal you're looking at: | PAPR | Likely signal | |------|---------------| | under 3 dB | CW / FM (constant envelope) | | 3–8 dB | AM / mixed | | 8–15 dB | wideband / spread-spectrum | | over 15 dB | bursty / impulsive | A status line at the bottom summarises the picture: "Dynamic range OK", "weak signal — ADC under-utilised", or "clipping risk". --- ## IQ Diagnostics · *Lab IQ (`5`)* The quality of the I/Q signal coming off the ADC. Problems here show up as artefacts in the spectrum. Each *deviation-from-ideal* is drawn as an analog **null-meter**: a centre tick is "perfect", and a coloured needle deflects left/right by how far off you are, with the span between centre and needle filled. A glance reads the state; the number beside it reads the exact value. - **DC I / DC Q** - how far each channel is offset from zero (a null-meter each), with a combined **DC magnitude** quality bar. A high DC offset puts a fixed tone right in the middle of your spectrum. - **DC spike** - how tall that centre-frequency spike is, in dBFS. Green below −40 dBFS. - **Amp imbalance** - whether I and Q carry the same power (null-meter). A mismatch creates mirror images of signals on the opposite side of centre. - **Phase imbalance** - whether I and Q are exactly 90° apart (null-meter). Also causes mirroring. - **IRR** - **Image Rejection Ratio** in dB, as a red→green quality bar. This is the key quadrature-quality figure: it tells you how far *below* every real signal its mirror image appears. 30 dB or more is good (images are faint); below 20 dB and the images become a problem. A contextual hint at the bottom summarises whether anything needs attention, colour-matched to severity. --- ## IQ Constellation · *Lab IQ (`5`)* The 2-D picture of the same I/Q stream, in the centre of the Lab IQ preset. Where the diagnostics give you the numbers, the constellation gives you the *shape*, and shape is often faster to read. It plots recent I/Q sample pairs as a dot-cloud over a fixed reference frame (the unit circle, a faint ±0.5 ring, and I/Q axes). What to look for: - A **circle** centred on the origin means healthy quadrature. - An **ellipse** means amplitude imbalance (I and Q at different levels). - A **tilt** means phase imbalance (I and Q not 90° apart). - The cloud's **offset** from centre is the DC offset (a small crosshair marks the measured DC point). The cloud is coloured by **point density**: a phosphor-scope look where sparse edges are a cool blue and the dense core glows orange, so you can see where the signal's energy actually concentrates. A measured **imbalance ellipse** is fitted over it: its axis ratio is the amplitude imbalance, its tilt the phase imbalance, the same two faults the diagnostics quantify, drawn straight onto the cloud. No live numbers sit here on purpose; they're one panel to the left. Yes, it looks like an old analog scope. That's the point. --- ## Hardware Vitals · *Lab Timing (`7`)* Whether the capture chain is keeping up, with a trend sparkline under each metric. - **Drops** — samples lost per second, plus the session total. Non-zero means USB or CPU can't keep up. - **ADC saturation** — how often samples hit the ADC ceiling, with the session peak. - **CPU / RAM** — sdrtop's own processor and memory use. CPU is a system-wide percentage (100% means every core is maxed), so on a multi-core machine a healthy figure is well under 100%. If CPU climbs toward the warn/crit thresholds at high sample rates, that's often the cause of drops. - **USB errors** — zero-length USB transfers, usually a cable or hub problem. Coloured by recent rate, not session total, so a single old glitch doesn't pin it red forever. - **SR** — configured versus actually-measured sample rate, e.g. `20.000 → 19.847 MHz (−0.8%)`. A large gap means USB can't sustain the requested rate. Shows `→ ---` when not streaming. - **BUF fill** — receive-buffer fill percentage with history. A leading indicator: if this trends upward toward 100%, drops are about to start. --- ## Sweep · *Lab Sweep (`9`)* The HackRF sees only as much spectrum at once as the sample rate covers (±10 MHz at 20 Msps). **Lab Sweep** maps a wider band by retuning across it: at each step it measures briefly, records the peak and mean level, then moves on, stitching the results into one curve with frequency on the x-axis. Known bands are labelled from the band plan, and the cursor reads out the level and band at any point. Because a full cycle takes a couple of seconds, sweep is for *finding* a signal, not watching it — once you spot one, focus the panel with `g` and press `Enter` to tune straight to the cursor frequency in normal RX. While focused, `s` / `e` set the start / end frequency live and `+` / `-` adjust the dwell; the band and dwell also live in the config (see [Configuration → Sweep scanner](config.md#sweep-scanner)). The `micro_sweep` step in the `0` cycle gives the same scan as a compact field list. --- ## Using the lab presets in practice A typical setup flow, switching presets as you go: 1. Tune to your target and start RX (`Space`). 2. In **Lab IQ (`5`)**, watch the **constellation**: adjust LNA/VGA (`↑`/`↓`, `[`/`]`) until the cloud is a bright, well-filled ring sitting comfortably *inside* the unit circle (smearing out to the edge means clipping). Glance at **IQ Diagnostics**: a centred needle on each null-meter, IRR above 30 dB and DC spike below −40 dBFS mean clean quadrature. 3. In **Lab RF (`6`)**, focus the **RF Diagnostics** panel (`D`) and press `A` to auto-stage the gain, then read **NF** and **MDS** to confirm the receiver is sensitive enough for what you're chasing. Watch the **ADC Loading** bell fill the range without touching the rails. 4. In **Lab Timing (`7`)**, confirm the timing verdict is Good/Excellent before committing to a long run. 5. During a long capture, keep an eye on **Hardware Vitals** (in **Lab Timing `7`**) — CPU, BUF fill, and Drops together tell you whether the run is sustainable. --- ← [Back to all screens](screens.md)