Spectrum Analysers and Network Analysers
An oscilloscope shows voltage against time with 8 bits of resolution, so anything below the main signal is lost in its noise. A spectrum analyser shows power against frequency over a dynamic range of or more: harmonics of an oscillator at , 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 :
So is , in ; every is a factor of 10 in power, every a factor of 10 in voltage. dBc is relative to the carrier; dBm/Hz is a noise density. EMC work uses ( in ).
The swept superheterodyne analyser
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,
where is the thermal noise at and NF the analyser's noise figure. And it sets the sweep time, which grows roughly as for a swept analyser. A sine's level does not depend on RBW (all its power fits in the filter); noise does, 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 : real signals keep their displayed level, internally generated ones change.
Worked example: a weak tone and the noise floor
Given: an analyser with and a tone.
Find: the noise floor and the tone's height above it at and .
Solve:
Check: three decades of RBW lower the floor by and leave the tone unchanged, so the tone appears. The cost is sweep time: about for a span at RBW with an analogue-style filter, the reason narrow-RBW measurements use narrow spans.
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 the incident and the outgoing waves at port :
is the input reflection coefficient (return loss , ) and the forward transmission (gain, or insertion loss). S-parameters suit RF because they are measured with the ports terminated in , 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 with cutoff : series , shunt , series .
Find: , and VSWR at to , as a VNA would show them.
Solve: for a Butterworth response , so at and at . The filter is lossless, so : at both are . scikit-rf builds the network from its elements and computes the S-parameters:
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: follows the Butterworth formula, and the VSWR grows huge in the stopband: the filter rejects power by reflecting it, not absorbing it. Below cutoff is tiny ( at ), a good match.
Simulation. The same filter between a source (AC magnitude ) and a load: with that drive equals . Read at ; move the frequency to and it reads about . Node in rises towards the full in the stopband: the filter's input looks like an open or short, and the incident wave is reflected. Slide and watch the passband develop a dip or droop as the design departs from Butterworth.
Guided lab: harmonics of a generator
Hand calculation. A generator rated at "harmonics below " set to ( into ) at should show its second harmonic at below .
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 under .
What you would measure. Connect the generator through a attenuator to the analyser input (protects the input and improves the match), span to , RBW , reference level . Expect the carrier at (after the pad, within of flatness), harmonics typically to lower, and a floor near to . Add 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 with the program.
Hazards and safe setup. Analyser inputs are typically damaged above about 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
- A tone reads in . What is its rms voltage?
- A floor reads at . What is it in dBm/Hz, and what will it read at ?
- . Find the return loss and VSWR.
Answer
- , .
- ; at the floor drops , to .
- Return loss ; VSWR .
Test yourself
Reducing the RBW by a factor of 10 changes a displayed sine tone by
- -10 dB
- nothing
- +10 dB
- -20 dB
The displayed noise floor of an analyser with NF = 20 dB at RBW = 10 kHz is about
- -174 dBm
- -114 dBm
- -134 dBm
- -154 dBm
of a two-port is
- the input reflection coefficient
- the forward transmission coefficient
- the output impedance
- the reverse isolation
A suspected spur drops by 20 dB when you add 10 dB of input attenuation. It is
- a real signal
- generated inside the analyser (overload)
- noise
- a calibration error