Skip to content

Harmonic Mixing

The Si5351 frequency synthesizer has a practical upper limit around 200-300 MHz. To measure at VHF, UHF, and beyond, the NanoVNA-H uses a clever technique: harmonic mixing. By generating a fundamental frequency and mixing with its odd harmonics, the VNA can measure up to 1.5 GHz or higher.

Frequency Coverage: 600 Hz – 2 GHz
Ultra-Low
Low
Direct
3rd Harmonic
5th Harmonic
7th Harmonic
1 kHz
100 kHz
1 MHz
10 MHz
100 MHz
290 MHz
1 GHz
2 GHz
Signal Generation Method
Direct (fundamental)
3rd harmonic
5th harmonic
7th harmonic
Dynamic Range
Direct: >70 dB
3rd Harmonic: ~50 dB
5th Harmonic: ~40 dB
7th Harmonic: ~30 dB
Harmonic threshold: ~290 MHz (SA612A) or ~300 MHz (ZeeTK NE602A)

The firmware defines a boundary where it switches from direct synthesis to harmonic mode:

// From nanovna.h
#ifdef __ZEETK__
#define FREQUENCY_THRESHOLD 300000110U // 300 MHz for ZeeTK NE602A
#else
#define FREQUENCY_THRESHOLD 290000110U // 290 MHz for SA612A
#endif
  • Below threshold: Direct frequency synthesis
  • Above threshold: Harmonic mixing with odd harmonics (3rd, 5th, 7th…)

The Si5351 outputs square waves, which are rich in odd harmonics:

Square wave = sin(f) + (1/3)sin(3f) + (1/5)sin(5f) + (1/7)sin(7f) + ...
HarmonicRelative AmplitudedB below fundamental
1st (fundamental)1.0000 dB
3rd0.333-9.5 dB
5th0.200-14 dB
7th0.143-17 dB
9th0.111-19 dB

To measure at frequency f_target:

  1. Generate fundamental at f_fund = f_target / harmonic_number
  2. The DUT sees the harmonic component at f_target
  3. The LO also generates harmonics at f_target + IF_offset
  4. Mixing produces the same IF frequency as direct mode
flowchart LR
  subgraph RF Path
      SI[Si5351<br/>100 MHz] --> |3rd harmonic| DUT[DUT<br/>300 MHz]
  end

  subgraph LO Path
      LO[Si5351<br/>100 MHz + IF/3] --> |3rd harmonic| MIX[Mixer]
  end

  DUT --> MIX
  MIX --> IF[IF Output<br/>12 kHz]

The firmware determines which harmonic to use based on the target frequency:

uint32_t si5351_get_harmonic_lvl(uint32_t freq) {
if (freq < FREQUENCY_THRESHOLD)
return 1; // Direct mode
// Find lowest odd harmonic that puts fundamental in range
uint32_t harmonic = 3;
while (freq / harmonic > (FREQUENCY_THRESHOLD - 10000000))
harmonic += 2; // Only odd harmonics
return harmonic;
}
Target FrequencyHarmonicFundamental Frequency
50 - 290 MHz1st (direct)50 - 290 MHz
290 - 870 MHz3rd97 - 290 MHz
870 - 1450 MHz5th174 - 290 MHz
1450 - 2000 MHz7th207 - 286 MHz

Harmonic mixing reduces dynamic range because:

  1. Lower harmonic power: 3rd harmonic is 9.5 dB down
  2. Double the loss: Both RF and LO are reduced
  3. Total penalty: Approximately 19 dB for 3rd harmonic
Dynamic Range (harmonic) = Dynamic Range (direct) - 20*log10(1/N)

Where N is the harmonic number.

ModeHarmonicTypical Dynamic Range
Direct1st> 70 dB
3rd harmonic3rd~ 50-55 dB
5th harmonic5th~ 40-45 dB
7th harmonic7th~ 35-40 dB

In harmonic mode, the IF offset must be divided by the harmonic number to maintain the correct final IF:

// When generating LO for harmonic mode
uint32_t lo_offset = FREQUENCY_OFFSET / harmonic;
// LO fundamental = target/harmonic + IF_offset/harmonic
// LO at harmonic = target + IF_offset (same as direct mode)

The transition between direct and harmonic modes creates a discontinuity in the error terms. The calibration interpolation routine handles this specially:

// From main.c cal_interpolate()
uint32_t hf0 = si5351_get_harmonic_lvl(src_f0);
if (hf0 != si5351_get_harmonic_lvl(src_f1)) {
// Points span a harmonic boundary
// Cannot interpolate across - must extrapolate within same mode
if (hf0 == si5351_get_harmonic_lvl(f)) {
// Use points from current harmonic region
// ... extrapolation code
}
}

Harmonic mixing can create spurious responses (spurs) from:

  1. Unwanted harmonic combinations: RF 3rd mixing with LO 5th
  2. Image frequencies: (LO - RF) as well as (LO + RF) products
  3. Intermodulation: From non-linearities in mixers

Common spur patterns near 290 MHz boundary:

Spur TypeFrequencyMitigation
3rd-5th mixingVariousFiltering
LO leakthroughAt LO freqIsolation
Half-IFAt IF/2 offsetCareful cal

The firmware includes some spur mitigation:

// Avoid exact harmonic boundary
#define FREQUENCY_THRESHOLD 290000110U // Not exactly 290 MHz

The odd offset (110 Hz) prevents the fundamental and harmonic frequencies from landing on exact multiples that might produce coherent spurs.

  • Antenna SWR at UHF: Return loss up to ~30 dB measurable
  • Filter passbands: Good for tuning UHF filters
  • Relative measurements: Comparing similar DUTs
  • Filter stopband: May not see > 40 dB rejection
  • High-isolation measurements: Limited by harmonic mode range
  • Phase accuracy at UHF: Increased phase noise

Different mixer chips affect harmonic performance:

ChipFrequency CoverageNotes
SA612A (NXP)Up to ~290 MHz directOriginal chip, discontinued
NE602A (ZeeTK)Up to ~300 MHz directDrop-in replacement
BothTo 1.5+ GHz harmonicsWith reduced dynamic range
#ifdef __ZEETK__
#define FREQUENCY_THRESHOLD 300000110U // ZeeTK allows higher
#else
#define FREQUENCY_THRESHOLD 290000110U // SA612A more conservative
#endif
ParameterDirect Mode3rd Harmonic5th Harmonic
Frequency0-290 MHz290-870 MHz870-1450 MHz
Dynamic Range> 70 dB~50 dB~40 dB
Phase NoiseLowestModerateHigher
CalibrationNormalDiscontinuityDiscontinuity

Learn how the firmware manages real-time tasks in Threading Model.