← Back to Projects
07

Linear-Algebra Channel Decoding Simulations

Python simulations validating bit-error-rate performance across encoding schemes under noise, with publication-quality figures automated in MATLAB.

PythonMATLABChannel CodingBER AnalysisLinear Algebra

Context: Mitchell Coding Group, NMSU
My role: Research Assistant
Status: Complete · Aug 2025 - Feb 2026

7 months
independent research, reporting to the PI
Multi-hour
experiment runs, automated end to end
MATLAB plot of channel decoding simulation resultsMATLAB plot visualising experimental results
Publication-quality figures produced by the automated MATLAB pipeline.

Interactive model · one of four in the Lab

Syndrome decoder

An error-correcting code adds parity bits so the receiver can find and fix what the channel broke. This is a Hamming(7,4) code, decoded from the syndrome H·rᵀ: first one word by hand, then the same experiment repeated until the error-rate curves appear.

Click a message bit to change the word, or a received bit to flip it in transit.
d1d2d3d4p1p2p3
Messageparity is computed
Sent0000000
Received
Decoded0000000
Parity-check matrix H, and the syndrome s = H·rᵀ over GF(2). A nonzero syndrome equals the column of the bit to flip.
11011000
H1011010s0
01110010

The same experiment, a few hundred thousand times

  • Frame error rate: circles simulated, line exact
  • Bit error rate after decoding: crosses simulated, dashes exact
  • Uncoded: the channel's own error rate
Frames simulated
0
Frame error rate at p = 0.05
0
One word
Monte Carlo sweep

Try this

  1. Click one bit in the Received row. The syndrome stops being 000, it matches one column of H, and that column names the bit to flip back.
  2. Click a second bit. The syndrome still points somewhere, but at a bit that was never wrong. The decoder "fixes" it and hands back a valid codeword that is not the one sent: a frame error.
  3. Press Run the sweep. Every point is that experiment repeated thousands of times at one channel error probability. The simulated points settle onto the exact curves, which is the check that the simulation is right.
  4. Read the left edge of the chart: below p ≈ 0.1 the decoded bit error rate drops under the uncoded line. That gap is what the three parity bits buy.
Hamming(7,4) over a binary symmetric channel is the textbook instance of the method, chosen because every step fits on screen. The research code itself is unpublished and none of it is used here. The exact curves come from enumerating all 128 error patterns.Model: src/lib/sim/hamming.js · Tests: tests/sim.test.js

Problem and context

Whether a channel code performs as theory predicts is answered by measuring bit error rate across encoding schemes under noise, over enough trials that the tail of the distribution is populated rather than guessed at.

Constraints

Runs took multiple hours each, so anything requiring a human to babysit a run, transcribe a result, or hand-plot a figure would have bounded how many conditions could be explored. I worked independently on an assigned research question over seven months, reporting results to the principal investigator.

Design and tradeoffs

I developed the decoding simulations in Python, expressing the decoder in linear-algebra terms so encoding schemes could be swapped without rewriting the harness. Experiments were then automated over contrasting input bit-strings to verify decoder reliability under varied conditions.

The deliberate investment was in automating statistics and plotting in MATLAB rather than producing figures by hand. Automating the pipeline is slower for the first figure and faster for every one after, and it removes the transcription errors that creep in when results are moved by hand.

Results

Bit-error-rate performance validated across multiple encoding schemes under noise, with multi-hour experiment campaigns run unattended and publication-quality figures generated directly from the result data.

Limitations and what is next

This was simulation, not over-the-air measurement, so it validates the decoder against a channel model rather than against a real radio. Comparing against captured RF would be the natural extension.