- Overview
- Features
- Repository Structure
- How It Works
- Installation & Usage
- Performance Considerations
- Future Improvements
- License
- Author
This MATLAB-based project implements a Binary Phase Shift Keying (BPSK) communication system with Pseudo-Random Noise (PRN) code synchronization. The system includes a transmitter and a receiver, allowing for data transmission over an audio channel. It supports multiple PRN codes for synchronization and identification, making it suitable for applications like satellite communication and spread spectrum systems. 🚀
✅ BPSK Modulation and Demodulation
✅ PRN Code Generation (Gold Codes)
✅ Audio Transmission via soundsc
✅ Cross-Correlation-Based PRN Synchronization
✅ Bit Error Rate (BER) Calculation
✅ Support for Multiple PRN Codes (Simulated Satellites)
BPSK-PRN-Synchronization
├── Transmitter/ # Transmitter code
│ ├── transmitter.m # MATLAB script for BPSK modulation
│ ├── generateGoldCode.m # Function to generate PRN codes
│ ├── bpsk_modulate.m # Function for BPSK modulation
├── Receiver/ # Receiver code
│ ├── receiver.m # MATLAB script for BPSK demodulation
│ ├── bpsk_demodulate.m # Function for BPSK demodulation
│ ├── recorded_signal.wav # Example recorded signal (optional)
├── README.md # Project documentation
└── LICENSE # License file
- Generates random binary data. 🎲
- Appends a PRN code to the beginning of the data for synchronization. 🔗
- Modulates the data using BPSK. 📡
- Broadcasts the signal using
soundsc. 🔊
bpsk_modulate(data, fc, fs, data_rate): BPSK modulationgenerateGoldCode(length): Generates PRN codes
- Records the transmitted signal (or loads a pre-recorded signal). 🎤
- Uses cross-correlation with the PRN code to find the start of the signal. 🔍
- Extracts and demodulates the BPSK signal to recover the original data. 📟
- Calculates the bit error rate (BER) to evaluate performance. 📊
bpsk_demodulate(signal, fc, fs, data_rate): BPSK demodulation- PRN Synchronization: Cross-correlation with stored PRN codes
- Bit Error Rate Calculation
- MATLAB (Tested on R2023a, but compatible with earlier versions) 🖥️
- A sound card and speakers (for transmission) 🔊
- A microphone (for receiving audio signals) 🎙️
- Open
transmitter.min MATLAB. 💻 - Set parameters like
fs,fc,data_rate, andprn_length. ⚙️ - Run the script to generate and broadcast the BPSK-modulated signal. 📡
- The transmitted signal is saved in
transmitted_signal.mat. 💾
- Record the transmitted signal (e.g., using an external microphone or MATLAB's
audiorecorder). 🎤 - Load the recorded
.wavfile in MATLAB. 📂 - Run
receiver.mto:- Identify the correct PRN code using cross-correlation. 🔍
- Extract and demodulate the BPSK signal. 📟
- Display the recovered data and compute the BER. 📊
✅ Requires improved synchronization and error correction
🚀 Enhancing PRN synchronization robustness
🚀 Implementing error correction (e.g., Hamming codes, Viterbi decoding)
🚀 Expanding to Quadrature Phase Shift Keying (QPSK) for higher data rates
🚀 Improving audio transmission reliability
This project is open-source under the MIT License. Feel free to use, modify, and contribute! 🤝
[Saba_abiri]
🔗 GitHub: Saba Abiri
📧 Email: [Saba0abiri@gmail.com]
💡 If you encounter any issues or have suggestions, feel free to open an issue or contribute to the repository! 🚀