This repository contains a full Loopback On - Off Keying (OOK) modulation, transmission and recovery system developed in GNU Radio. The project covers the entire signal processing chain: from baseband data generation to hardware-simulated channel effects and bit-accurate data recovery of ASCII - encoded payloads.
Figure 1: Full block path of Phase II and III
- Full loopback: Complete signal path: (Transmitter - Modulator - Channel - Demodulator / Receiver - Sink)
- Hardware simulation: Channel model including AWGN (Additive White Gaussian Noise)
- Smart recovery: Implementation of Thresholding with Hysteresis to combat noise.
- Data integrity: Verified ASCII transmission (Vector Source to File Sink)
| Parameter | Value | Description |
|---|---|---|
| Sample Rate ( |
32 kHz | Base clock for all processing blocks. |
| Carrier Frequency ( |
2 kHz | Cosine wave used for the OOK "ON" state. |
| Bitrate ( |
320 bps | Resulting data rate after interpolation ( |
| Interpolation Factor ( |
100 | Samples per symbol to ensure |
| Modulation Type | OOK | On-Off Keying (Binary ASK). |
The system is divided into three main phases:
1. Phase I: Basic Modulation using a Random Source. 2. Phase II: Transmitter architecture 3. Phase III: Receiver design featuring envelope detection, normalization, and decimation.
To run this project, you need GNU Radio 3.8+ and Python 3.
- Download the
.grcor the.pyfile. - Run the file, in my recomendation, download and run the
.grcfile to change the ASCII code to transmitt. - Synchonize the Bitstream If you changed the ASCII code to one of your elecction or added more codes to transmitt, you need to synchonize again the bitstream.
- Ensure the file paths in the File sink blocks point to valid directories on your system.
In order to synchronize it, a slicer and a counter is located in the bottom to modify the delay, it only works in that plot, to get it finally the ASCII at the end and in your file you need to abort the simulation and change the default value for the one that you get with the slicer QT GUI Range, once you run the simulation again the bitstream is goin to be synchronized since the beginning.
Read the Project Report to get a detailed description of the structure of this project such as mathematical breakdown, frequency hierarchy analysis and results verification.