D4 · Lesson 10 · Capstone
A receiver built from the course's pieces, working on raw complex samples of a QPSK signal, a matched filter that adds up each symbol's samples, a known preamble that measures and removes the carrier's phase, Gray-coded decisions, bits back to text, and a measured error rate that lands on the theory
A software-defined radio hands you nothing but a stream of complex numbers: the in-phase and quadrature samples of whatever arrived at the antenna, buried in noise and rotated by an unknown carrier phase. Somewhere in it is a message. Getting it out takes every idea in this course: a filter matched to the pulse to collect each symbol's energy, a known preamble to find the phase, decisions against the constellation's boundaries, and bits turned back into characters. Then, as a check that the receiver is as good as it can be, its measured error rate should match the formula of lesson 5.
- QPSK symbols as received: rotated by an unknown carrier phase and scattered by noise. The receiver's decision regions are the four quadrants.
- Rotate by more than 45° and every symbol lands in the wrong quadrant, however strong the signal. That's why the receiver must estimate and remove the phase before deciding.
- A preamble of symbols the receiver already knows makes the estimate easy: compare what arrived with what was sent.
Predict
The receiver adds up the 8 samples of each symbol before deciding. Compared with deciding from a single sample, by how much does that improve the SNR?
The signal's 8 samples add in step, so its amplitude grows 8 times and its power 64 times. The noise samples are independent, so their powers add: 8 times. The SNR improves by 64/8 = 8, or 9.0 dB. That's the matched filter at work: for rectangular pulses, integrate and dump collects all of the symbol's energy.
Name it
The receiver chain
- Matched filter: for rectangular pulses, sum each symbol's samples (integrate and dump). The SNR improves by .
- Phase estimate: with known preamble symbols and their received versions , the carrier phase is . Multiplying every symbol by undoes the rotation. Real receivers track the phase continuously with a phase-locked loop (D5).
- Decisions: for Gray-coded QPSK, is the sign of I and the sign of Q.
- Framing: drop the preamble and turn each 8 bits into a character.
Scaling the noise
With symbols of unit energy per sample, samples per symbol and complex Gaussian noise of standard deviation σ in each of I and Q, each QPSK bit has
so a simulation at a chosen uses , and its measured error rate should approach .
Worked example
The message is 34 characters sent at = 7 dB. How many bit errors should you expect?
Show the solution
- Bit error rate. 7 dB is a ratio of 5.01:
- Bits sent.
- Expected errors.
- What you see. Most transmissions arrive perfectly. About one in five has an error, almost always a single flipped bit and so a single wrong character.
Answer expect about 0.21 bit errors per message.
Worked example
The Python step measures 40,000 bits at 4 dB. What should it find?
Show the solution
- Error rate at 4 dB. 4 dB is a ratio of 2.51:
- Expected errors.
- Compare with the measurement. The reference receiver counted 483, an error rate of 0.0121, within the statistical spread of errors.
Answer it should find about 500 errors.
Worked example
The 34-character message is sent at 1200 b/s with 8 bits per character. How long does it take on the air?
Show the solution
- Bits.
- Time on the air. At 1200 b/s:
- Overhead. A preamble for carrier phase and timing, and a CRC for checking, add a little more; packet radio protocols such as AX.25 send about this way.
Answer about 0.23 s.
Check
Build the receiver: integrate and dump, the phase estimate, the decisions and the text.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
A matched filter sums 16 samples per symbol, each with independent noise. How much does it improve the SNR?
Check
A simulation has 8 samples per QPSK symbol of unit energy per sample. What noise standard deviation per component gives = 4 dB?
Check
A 34-character message is sent as QPSK at = 6 dB. How many bit errors should you expect on average?
Check
A message of 34 8-bit characters is sent by BPSK at = 5 dB.
(a)
How many bit errors are expected?
(b)
What is the chance the whole message arrives with no errors?
Check
A simulation counts errors in 10000 BPSK bits at = 3 dB.
(a)
How many errors should it find on average?
(b)
About how much does that count scatter from run to run (one standard deviation)?
Explain why
Why does the receiver need a known preamble before it can decide QPSK symbols?
The receiver's local oscillator isn't locked to the transmitter's carrier, so every received symbol arrives rotated by an unknown phase. QPSK puts its information in the phase, and its decision boundaries are fixed lines through the origin, so a rotation of more than 45 degrees moves every symbol into a neighbor's region and every decision is wrong, however clean the signal. A preamble is a short run of symbols the receiver knows in advance; comparing what arrived with what was sent, and averaging over the preamble to beat down the noise, gives the rotation, which the receiver then removes from every symbol that follows.
Practice
Keep practicing
7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.