TExcelTAD
Home › Electrical & Electronic Measurements › Spectrum Analysers and Network Analysers

Spectrum Analysers and Network Analysers

An oscilloscope shows voltage against time with 8 bits of resolution, so anything 50 dB50\ \text{dB} below the main signal is lost in its noise. A spectrum analyser shows power against frequency over a dynamic range of 100 dB100\ \text{dB} or more: harmonics of an oscillator at −70 dBc-70\ \text{dBc}, a weak interferer next to a strong carrier, the noise floor of an amplifier. A network analyser goes one step further: it supplies its own stimulus and measures how a device transmits and reflects it, as complex S-parameters. Both are central to RF work, which the planned course Communications, RF Engineering and Antennas develops; this lesson covers how to use them as measuring instruments.

Decibels in a 50 ohm world

RF instruments express power relative to 1 mW1\ \text{mW}:

PdBm=10log⁡10P1 mW,Vrms=P×50 ΩP_\text{dBm} = 10\log_{10}\frac{P}{1\ \text{mW}}, \qquad V_\text{rms} = \sqrt{P \times 50\ \Omega}

So 0 dBm0\ \text{dBm} is 1 mW1\ \text{mW}, 224 mVrms224\ \text{mV}_\text{rms} in 50 Ω50\ \Omega; every 10 dB10\ \text{dB} is a factor of 10 in power, every 20 dB20\ \text{dB} a factor of 10 in voltage. dBc is relative to the carrier; dBm/Hz is a noise density. EMC work uses dBμV\text{dB}\mu\text{V} (0 dBm=107 dBμV0\ \text{dBm} = 107\ \text{dB}\mu\text{V} in 50 Ω50\ \Omega).

The swept superheterodyne analyser

input 50 Ohm attenuator 0-50 dB mixer x IF filter RBW detector peak, RMS video filter VBW display dBm vs f local oscillator swept sweep generator tunes LO, moves x

The input passes a step attenuator (to keep the mixer linear), then a mixer driven by a swept local oscillator. Whatever input frequency differs from the LO by the intermediate frequency passes the IF filter, whose width is the resolution bandwidth (RBW). A detector turns the IF envelope into a level, a video filter (VBW) smooths it, and the display plots it against the LO's tuning. Modern analysers digitise the IF and compute RBW filters and FFTs digitally; real-time analysers compute overlapping FFTs fast enough to see every transient.

RBW decides three things. It sets the ability to separate two close tones (they must be more than about one RBW apart, more if their levels differ). It sets the noise floor: the displayed noise is the power in the RBW,

DANL≈−174 dBm/Hz+NF+10log⁡10RBW1 Hz\text{DANL} \approx -174\ \text{dBm/Hz} + \text{NF} + 10\log_{10}\frac{\text{RBW}}{1\ \text{Hz}}

where −174 dBm/Hz-174\ \text{dBm/Hz} is the thermal noise kTkT at 290 K290\ \text{K} and NF the analyser's noise figure. And it sets the sweep time, which grows roughly as span/RBW2\text{span}/\text{RBW}^2 for a swept analyser. A sine's level does not depend on RBW (all its power fits in the filter); noise does, 10 dB10\ \text{dB} per decade. That is how you tell a tone from noise: change the RBW and watch whether the trace moves.

VBW only smooths the displayed trace (it does not lower the true noise power), and detector choice matters for noise: a peak detector reads noise several dB high, an RMS (power) detector reads it correctly. Use RMS detection and a noise marker (dBm/Hz) for noise measurements.

Overload. A strong signal anywhere in the input band, even outside the span shown, can drive the mixer into compression and create spurious products that look like real signals. Raise the input attenuation by 10 dB10\ \text{dB}: real signals keep their displayed level, internally generated ones change.

Worked example: a weak tone and the noise floor

Given: an analyser with NF=24 dB\text{NF} = 24\ \text{dB} and a −100 dBm-100\ \text{dBm} tone.

Find: the noise floor and the tone's height above it at RBW=1 MHz\text{RBW} = 1\ \text{MHz} and 1 kHz1\ \text{kHz}.

Solve:

RBW=1 MHz:−174+24+60=−90 dBm(the tone is 10 dB below the floor: invisible)RBW=1 kHz:−174+24+30=−120 dBm(the tone stands 20 dB above it)\begin{aligned} \text{RBW} = 1\ \text{MHz}: &\quad -174 + 24 + 60 = -90\ \text{dBm} \quad \text{(the tone is 10 dB below the floor: invisible)} \\ \text{RBW} = 1\ \text{kHz}: &\quad -174 + 24 + 30 = -120\ \text{dBm} \quad \text{(the tone stands 20 dB above it)} \end{aligned}

Check: three decades of RBW lower the floor by 30 dB30\ \text{dB} and leave the tone unchanged, so the tone appears. The cost is sweep time: about 2.5 s2.5\ \text{s} for a 100 MHz100\ \text{MHz} span at 10 kHz10\ \text{kHz} RBW with an analogue-style filter, the reason narrow-RBW measurements use narrow spans.

python · try it yourself
import numpy as np

# dBm <-> volts in a 50 ohm system
for dbm in (0, -30, -100):
    P = 1e-3 * 10 ** (dbm / 10)
    V = np.sqrt(P * 50)
    print(f"{dbm:5d} dBm = {P:.3e} W = {1e3 * V:.4g} mV rms in 50 ohm")

# Displayed average noise level (DANL) of an analyser with a 24 dB noise figure,
# and a -100 dBm tone, for several resolution bandwidths
NF = 24.0
tone = -100.0
print(" RBW      noise floor   tone   tone above floor")
for rbw in (1e6, 100e3, 10e3, 1e3, 100.0):
    floor = -174 + NF + 10 * np.log10(rbw)
    print(f"{rbw:>8.0f} Hz {floor:8.1f} dBm {tone:6.1f} {tone - floor:8.1f} dB")

# Sweep time of a swept analyser: roughly k * span / RBW^2 (k about 2 to 3 for analogue filters)
span = 100e6
for rbw in (1e6, 100e3, 10e3):
    print(f"span 100 MHz, RBW {rbw / 1e3:6.0f} kHz: sweep about {2.5 * span / rbw**2:.4g} s")
    0 dBm = 1.000e-03 W = 223.6 mV rms in 50 ohm
  -30 dBm = 1.000e-06 W = 7.071 mV rms in 50 ohm
 -100 dBm = 1.000e-13 W = 0.002236 mV rms in 50 ohm
 RBW      noise floor   tone   tone above floor
 1000000 Hz    -90.0 dBm -100.0    -10.0 dB
  100000 Hz   -100.0 dBm -100.0      0.0 dB
   10000 Hz   -110.0 dBm -100.0     10.0 dB
    1000 Hz   -120.0 dBm -100.0     20.0 dB
     100 Hz   -130.0 dBm -100.0     30.0 dB
span 100 MHz, RBW   1000 kHz: sweep about 0.00025 s
span 100 MHz, RBW    100 kHz: sweep about 0.025 s
span 100 MHz, RBW     10 kHz: sweep about 2.5 s

Network analysers and S-parameters

A vector network analyser (VNA) drives a port of the device under test with a swept sine and measures, with directional couplers, the wave going in, the wave reflected and the wave transmitted, as complex ratios. For a two-port with aia_i the incident and bib_i the outgoing waves at port ii:

[b1b2]=[S11S12S21S22][a1a2]\begin{bmatrix} b_1 \\ b_2 \end{bmatrix} = \begin{bmatrix} S_{11} & S_{12} \\ S_{21} & S_{22} \end{bmatrix} \begin{bmatrix} a_1 \\ a_2 \end{bmatrix}

S11S_{11} is the input reflection coefficient (return loss =−20log⁡10∣S11∣= -20\log_{10}\lvert S_{11} \rvert, VSWR=(1+∣S11∣)/(1−∣S11∣)\text{VSWR} = (1 + \lvert S_{11} \rvert)/(1 - \lvert S_{11} \rvert)) and S21S_{21} the forward transmission (gain, or insertion loss). S-parameters suit RF because they are measured with the ports terminated in 50 Ω50\ \Omega, where open and short circuits (needed for Z and Y parameters, Two-Port Networks) are impossible to realise at high frequency. A VNA must be calibrated at the end of its cables with known standards (short, open, load, through: SOLT), which moves the reference plane to the device and removes the cables' and couplers' errors, the same idea as an LCR meter's open/short compensation (LCR Meters). A scalar network analyser measures only magnitudes.

Worked example: a 100 MHz low-pass filter

Given: a 3rd-order Butterworth low-pass for 50 Ω50\ \Omega with cutoff 100 MHz100\ \text{MHz}: series L=79.6 nHL = 79.6\ \text{nH}, shunt C=63.7 pFC = 63.7\ \text{pF}, series L=79.6 nHL = 79.6\ \text{nH}.

Find: S21S_{21}, S11S_{11} and VSWR at 1010 to 300 MHz300\ \text{MHz}, as a VNA would show them.

Solve: for a Butterworth response ∣S21∣2=1/(1+(f/fc)6)\lvert S_{21} \rvert^2 = 1/(1 + (f/f_c)^6), so −3.01 dB-3.01\ \text{dB} at 100 MHz100\ \text{MHz} and −18.1 dB-18.1\ \text{dB} at 200 MHz200\ \text{MHz}. The filter is lossless, so ∣S11∣2+∣S21∣2=1\lvert S_{11} \rvert^2 + \lvert S_{21} \rvert^2 = 1: at 100 MHz100\ \text{MHz} both are −3.01 dB-3.01\ \text{dB}. scikit-rf builds the network from its elements and computes the S-parameters:

python · try it yourself
import matplotlib            # scikit-rf looks for Matplotlib when it is imported
import numpy as np
import skrf as rf

# A 3rd-order Butterworth low-pass, 100 MHz, 50 ohm: series L, shunt C, series L
L = 50 / (2 * np.pi * 100e6)          # 79.6 nH
C = 2 / (50 * 2 * np.pi * 100e6)      # 63.7 pF
freq = rf.Frequency.from_f([10, 50, 100, 200, 300], unit="MHz")
media = rf.media.DefinedGammaZ0(frequency=freq, z0=50)
lpf = media.inductor(L) ** media.shunt_capacitor(C) ** media.inductor(L)

s11_db = lpf.s_db[:, 0, 0]
s21_db = lpf.s_db[:, 1, 0]
vswr = lpf.s_vswr[:, 0, 0]
print(f"L = {1e9 * L:.1f} nH, C = {1e12 * C:.1f} pF")
print("  f (MHz)   S21 (dB)   S11 (dB)   VSWR   Butterworth S21 (dB)")
for f, a, b, v in zip(freq.f, s21_db, s11_db, vswr):
    ideal = -10 * np.log10(1 + (f / 100e6) ** 6)
    a, ideal = round(float(a), 2) + 0.0, round(float(ideal), 2) + 0.0     # + 0.0 avoids printing -0.00
    print(f"{f / 1e6:9.0f} {a:10.2f} {b:10.2f} {v:7.2f} {ideal:12.2f}")
L = 79.6 nH, C = 63.7 pF
  f (MHz)   S21 (dB)   S11 (dB)   VSWR   Butterworth S21 (dB)
       10       0.00     -60.00    1.00         0.00
       50      -0.07     -18.13    1.28        -0.07
      100      -3.01      -3.01    5.83        -3.01
      200     -18.13      -0.07  258.00       -18.13
      300     -28.63      -0.01 2918.00       -28.63

Check: S21S_{21} follows the Butterworth formula, and the VSWR grows huge in the stopband: the filter rejects power by reflecting it, not absorbing it. Below cutoff S11S_{11} is tiny (−60 dB-60\ \text{dB} at 10 MHz10\ \text{MHz}), a good match.

Simulation. The same filter between a 50 Ω50\ \Omega source (AC magnitude 2 V2\ \text{V}) and a 50 Ω50\ \Omega load: with that drive ∣V(out)∣\lvert V(\text{out}) \rvert equals ∣S21∣\lvert S_{21} \rvert. Read 0.7070.707 at 100 MHz100\ \text{MHz}; move the frequency to 200 MHz200\ \text{MHz} and it reads about 0.1240.124. Node in rises towards the full 2 V2\ \text{V} in the stopband: the filter's input looks like an open or short, and the incident wave is reflected. Slide CC and watch the passband develop a dip or droop as the design departs from Butterworth.

0121M10M100M1Gf (Hz)|V| (V)|V(out)||V(in)|phasors at f = 100.0 MHz (magnitude @ phase)V(src)2.00 V @ 0.0 degV(in)708 mV @ 45.0 degV(mid)999 mV @ -90.1 degV(out)707 mV @ -135.1 degI(V1)31.6 mA @ 161.5 degI(Rs)31.6 mA @ -18.5 degI(L1)31.6 mA @ -18.5 degI(C1)40.0 mA @ -0.1 degI(L2)14.1 mA @ -135.1 degI(RL)14.1 mA @ -135.1 deg

Guided lab: harmonics of a generator

Hand calculation. A generator rated at "harmonics below −50 dBc-50\ \text{dBc}" set to 0 dBm0\ \text{dBm} (632 mVpp632\ \text{mV}_\text{pp} into 50 Ω50\ \Omega) at 10 MHz10\ \text{MHz} should show its second harmonic at 20 MHz20\ \text{MHz} below −50 dBm-50\ \text{dBm}.

Simulation. Run the analyser program with your analyser's noise figure (or its DANL specification) to choose an RBW that puts the floor at least 10 dB10\ \text{dB} under −50 dBm-50\ \text{dBm}.

What you would measure. Connect the generator through a 10 dB10\ \text{dB} attenuator to the analyser input (protects the input and improves the match), span 00 to 50 MHz50\ \text{MHz}, RBW 10 kHz10\ \text{kHz}, reference level 0 dBm0\ \text{dBm}. Expect the carrier at −10 dBm-10\ \text{dBm} (after the pad, within ±1 dB\pm 1\ \text{dB} of flatness), harmonics typically 5050 to 60 dB60\ \text{dB} lower, and a floor near −110-110 to −120 dBm-120\ \text{dBm}. Add 10 dB10\ \text{dB} of input attenuation: real harmonics stay put, internally generated ones drop. If you have a VNA (or a NanoVNA-class instrument), calibrate it (SOLT) and measure a small LC filter: compare S21S_{21} with the program.

Hazards and safe setup. Analyser inputs are typically damaged above about +30 dBm+30\ \text{dBm} or by DC: use a DC block and an attenuator when unsure. Generator levels only. No antennas connected to transmitters.

Pitfalls

  • Comparing noise levels measured at different RBWs without normalising to dBm/Hz.
  • Measuring noise with a peak detector, or "lowering the noise" with VBW and thinking the floor moved.
  • Mistaking analyser-generated distortion for the device's: change the attenuation and see.
  • Using a VNA without calibrating at the device's connectors.

Practice

  1. A tone reads −40 dBm-40\ \text{dBm} in 50 Ω50\ \Omega. What is its rms voltage?
  2. A floor reads −95 dBm-95\ \text{dBm} at RBW=300 kHz\text{RBW} = 300\ \text{kHz}. What is it in dBm/Hz, and what will it read at 3 kHz3\ \text{kHz}?
  3. ∣S11∣=0.2\lvert S_{11} \rvert = 0.2. Find the return loss and VSWR.
Answer
  1. P=10−7 WP = 10^{-7}\ \text{W}, V=10−7×50=2.24 mVrmsV = \sqrt{10^{-7} \times 50} = 2.24\ \text{mV}_\text{rms}.
  2. −95−10log⁡10(3×105)=−149.8 dBm/Hz-95 - 10\log_{10}(3 \times 10^5) = -149.8\ \text{dBm/Hz}; at 3 kHz3\ \text{kHz} the floor drops 20 dB20\ \text{dB}, to −115 dBm-115\ \text{dBm}.
  3. Return loss 14.0 dB14.0\ \text{dB}; VSWR 1.2/0.8=1.51.2/0.8 = 1.5.

Test yourself

Reducing the RBW by a factor of 10 changes a displayed sine tone by

  1. -10 dB
  2. nothing
  3. +10 dB
  4. -20 dB

The displayed noise floor of an analyser with NF = 20 dB at RBW = 10 kHz is about

  1. -174 dBm
  2. -114 dBm
  3. -134 dBm
  4. -154 dBm

S21S_{21} of a two-port is

  1. the input reflection coefficient
  2. the forward transmission coefficient
  3. the output impedance
  4. the reverse isolation

A suspected spur drops by 20 dB when you add 10 dB of input attenuation. It is

  1. a real signal
  2. generated inside the analyser (overload)
  3. noise
  4. a calibration error