Digital Modulation
Est. read time: 1 minute | Last updated: May 28, 2025 by John Gentile
Contents
- Phase Shift-Keying (PSK)
- Direct Sequence Spread Spectrum (DSSS) / Code Division Multiple Access (CDMA)
- OFDM
- References
import numpy as np
import matplotlib.pyplot as plt
from scipy import signal
from rfproto import filter, modulation, plot, sig_gen
Phase Shift-Keying (PSK)
Binary Phase-Shift Keying (BPSK)
Quadrature Phase-Shift Keying (QPSK)
Direct Sequence Spread Spectrum (DSSS) / Code Division Multiple Access (CDMA)
data_bits = np.array([1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0]) # 11-bit barker code
bpsk_symbols = 2 * data_bits - 1
print(f"BPSK symbols: {bpsk_symbols}")
BPSK symbols: [ 1 -1 1 1 -1 1 1 1 -1 -1 -1]
tx = np.concatenate([bpsk_symbols, bpsk_symbols, bpsk_symbols, bpsk_symbols, bpsk_symbols, bpsk_symbols])
# sliding correlation of the transmitted sequence with the reference code:
result = np.correlate(tx,bpsk_symbols, mode='full')
plt.plot(result)
plt.show()
print(max(result))
11
OFDM
from IPython.display import YouTubeVideo
YouTubeVideo('1rpoUqx0360')
YouTubeVideo('UCRildDdrX4')