Before this:Complex signals & I/Q
Mixing & downconversion
Key takeaways Mixing multiplies the signal by a complex sinusoid from a numerically controlled oscillator (NCO), which shifts the whole spectrum in frequency. Downconversion mixes your chosen channel down to zero so it sits at baseband, ready to be filtered and demodulated. Mix, filter, and resample together make a digital downconverter (DDC).
Your channel is somewhere off-centre in a wide capture. This lesson is how you slide it to the middle — the first step of turning a channel into decoded data.
Multiplying shifts frequency
Here’s the key fact: multiplying two sinusoids shifts frequencies. Multiply your signal by a complex sine wave of frequency f and every component of the signal moves by f. Pick f to be minus your channel’s offset from centre, and the channel lands exactly at zero.
The complex sine wave comes from a numerically controlled oscillator (NCO) — software that produces a rotating I/Q value one sample at a time at whatever frequency you dial in. It’s the digital version of the local oscillator in an analog radio.
input channel at +200 kHz × NCO at -200 kHz = channel now at 0 Hz
Why move it to zero?
Downconverting to zero (baseband) makes everything after it simpler:
- The low-pass filter that isolates the channel is a plain filter around zero — no need to design a band-pass at some arbitrary frequency.
- Decimation can then shed the now-unneeded bandwidth.
- The demodulator works on a channel centred at zero, where phase and frequency changes are measured relative to nothing but the channel itself.
The digital downconverter (DDC)
Put the three operations together — mix to zero, low-pass filter to isolate,
decimate to the channel rate — and you have a digital downconverter, the
front door of nearly every software decoder. GopherTrunk has two distinct DDC
implementations for different jobs: a single-channel Downconverter used by the
replay path, and a multi-tap wideband DDCBank that extracts many channels from one
capture at once. They’re separate code paths that happen to do the same conceptual
thing — a distinction worth remembering when you read the
applied lesson.
Quick check: to bring a channel sitting at +200 kHz down to zero, you mix it with an NCO at…
Recap
- Mixing multiplies by an NCO’s complex sinusoid, shifting the spectrum.
- Downconversion mixes a channel to zero (baseband) for simpler downstream DSP.
- Mix + filter + decimate = a digital downconverter (DDC).
- GopherTrunk has two DDCs — a single-channel one and a wideband bank — for different jobs.
Next up: recovering the actual message — demodulation.
Frequently asked questions
What does mixing do in DSP?
Mixing multiplies your signal by a complex sinusoid from a numerically controlled oscillator. Multiplying two sinusoids shifts frequencies, so this moves your chosen channel up or down the spectrum. Mixing a channel down so it sits at zero frequency is called downconversion, and it centres the channel before filtering and demodulation.
What is a numerically controlled oscillator?
A numerically controlled oscillator (NCO) is software that generates a complex sine wave one sample at a time at a frequency you set — the digital equivalent of a local oscillator. You multiply the incoming I/Q by the NCO’s output to shift the spectrum by exactly that frequency.