Skip to main content

ber_dpsk

Function ber_dpsk 

Source
pub fn ber_dpsk(m: usize, ebn0_db: f64) -> Result<f64>
Expand description

Bit error rate of Gray-labelled M-DPSK with noncoherent detection over AWGN, as a function of $E_{b}/N_{0}$ (dB): $\frac{1}{2} e^{-E_{b}/N_{0}}$ for DBPSK (Proakis & Salehi, §4.5), and for $M \ge 4$ the average number of wrong bits over the decision sectors of the differential phase, whose probabilities come from differential_phase_tail at $\gamma_{s} = E_{b}/N_{0} \log_{2} M$:

$$ P_{b} = \frac{1}{\log_{2} M} \sum_{k=1}^{M-1} w_{k} \, P\left(\Delta\theta \in \left[\frac{(2k - 1)\pi}{M}, \frac{(2k + 1)\pi}{M}\right)\right), $$

$w_{k}$ the Hamming weight of the Gray label of the transition $k$ (for DQPSK, $P_{b} = \frac{1}{2}[P(|\Delta\theta| > \pi/4) + P(|\Delta\theta| > 3\pi/4)]$).

§Errors

Error::Config unless m is a power of two ≥ 2.

§Examples

use comnum_mapping::theory::ber_dpsk;
let g = comnum_math::db2lin(8.0);
assert!((ber_dpsk(2, 8.0).unwrap() - 0.5 * (-g).exp()).abs() < 1e-12);
// DQPSK is worse than DBPSK at the same E_b/N_0, and better than D8PSK
assert!(ber_dpsk(4, 8.0).unwrap() > ber_dpsk(2, 8.0).unwrap());
assert!(ber_dpsk(8, 8.0).unwrap() > ber_dpsk(4, 8.0).unwrap());