class sdr.PSK

Implements phase-shift keying (PSK) modulation and demodulation.

Notes

Phase-shift keying (PSK) is a linear phase modulation scheme that encodes information by modulating the phase of a carrier sinusoid. The modulation order \(M = 2^k\) is a power of 2 and indicates the number of phases used. The input bit stream is taken \(k\) bits at a time to create decimal symbols \(s[k] \in \{0, \dots, M-1\}\). These decimal symbols \(s[k]\) are then mapped to complex symbols \(x[k] \in \mathbb{C}\) by the equation

\[x[k] = \exp\left(j\left(\frac{2\pi}{M}s[k] + \phi\right)\right) .\]

Examples

See the Phase-shift keying example.

Constructors

PSK(order: int, phase_offset: float = 0.0, ...)

Creates a new PSK object.

Methods

ber(ebn0: ArrayLike | None = None, ...) ndarray

Computes the bit error rate (BER) at the provided \(E_b/N_0\) values.

ser(esn0: ArrayLike | None = None, ...) ndarray

Computes the symbol error rate (SER) at the provided \(E_s/N_0\) values.

modulate(symbols: ArrayLike) ndarray

Modulates to decimal symbols \(s[k]\) to complex symbols \(x[k]\).

demodulate(x_hat: ArrayLike) ndarray

Demodulates the complex symbols \(\hat{x}[k]\) to decimal symbols \(\hat{s}[k]\) using maximum-likelihood estimation.

Properties

property phase_offset : float

The phase offset \(\phi\) in degrees.

property symbol_map : ndarray

The symbol map \(\{0, \dots, M-1\} \mapsto \mathbb{C}\). This maps decimal symbols from \(0\) to \(M-1\) to complex symbols.

property order : int

The modulation order \(M = 2^k\).

property bps : int

The number of bits per symbol \(k = \log_2 M\).