## Analytical Expressions and Notations Used in BER Analysis

This topic covers the analytical expressions and notations for the theoretical analysis used in the BER functions (`berawgn`, `bercoding`, `berconfint`, `berfading``berfit`, `bersync`), Bit Error Rate Analysis app, and Bit Error Rate Analysis Techniques topic.

### Common Notation

This table defines the notations used in the analytical expressions in this topic.

Description Notation
Size of modulation constellation

M

Number of bits per symbol

`$k={\mathrm{log}}_{2}M$`

Energy per bit-to-noise power-spectral-density ratio

`$\frac{{E}_{b}}{{N}_{0}}$`

Energy per symbol-to-noise power-spectral-density ratio

`$\frac{{E}_{s}}{{N}_{0}}=k\frac{{E}_{b}}{{N}_{0}}$`

Bit error rate (BER)

`${P}_{b}$`

Symbol error rate (SER)

`${P}_{s}$`

Real part

`$\mathrm{Re}\left[\cdot \right]$`

Floor, largest integer smaller than the value contained in braces

`$⌊\cdot ⌋$`

This table describes the terms used for mathematical expressions in this topic.

Function Mathematical Expression
Q function

`$Q\left(x\right)=\frac{1}{\sqrt{2\pi }}\underset{x}{\overset{\infty }{\int }}\mathrm{exp}\left(-{t}^{2}/2\right)dt$`

Marcum Q function

`$Q\left(a,b\right)=\underset{b}{\overset{\infty }{\int }}t\mathrm{exp}\left(-\frac{{t}^{2}+{a}^{2}}{2}\right){I}_{0}\left(at\right)dt$`

Modified Bessel function of the first kind of order $\nu$

`${I}_{\nu }\left(z\right)=\sum _{k=0}^{\infty }\frac{{\left(z/2\right)}^{\upsilon +2k}}{k!\Gamma \left(\nu +k+1\right)}$`

where

`$\Gamma \left(x\right)=\underset{0}{\overset{\infty }{\int }}{e}^{-t}{t}^{x-1}dt$`

is the gamma function.

Confluent hypergeometric function

`${}_{1}F{}_{1}\left(a,c;x\right)=\sum _{k=0}^{\infty }\frac{{\left(a\right)}_{k}}{{\left(c\right)}_{k}}\frac{{x}^{k}}{k!}$`

where the Pochhammer symbol, ${\left(\lambda \right)}_{k}$, is defined as ${\left(\lambda \right)}_{0}=1$, ${\left(\lambda \right)}_{k}=\lambda \left(\lambda +1\right)\left(\lambda +2\right)\cdots \left(\lambda +k-1\right)$.

This table defines the acronyms used in this topic.

Acronym Definition
M-PSKM-ary phase-shift keying
DE-M-PSKDifferentially encoded M-ary phase-shift keying
BPSKBinary phase-shift keying
DE-BPSKDifferentially encoded binary phase-shift keying
QPSKQuaternary phase-shift keying
DE-OQPSKDifferentially encoded offset quadrature phase-shift keying
M-DPSKM-ary differential phase-shift keying
M-PAMM-ary pulse amplitude modulation
M-FSKM-ary frequency-shift keying
MSKMinimum shift keying
M-CPFSKM-ary continuous-phase frequency-shift keying

### Analytical Expressions Used in `berawgn` Function and Bit Error Rate Analysis App

These sections cover the main analytical expressions used in the `berawgn` function and Bit Error Rate Analysis app.

#### M-PSK

From equation 8.22 in ,

`${P}_{s}=\frac{1}{\pi }\underset{0}{\overset{\left(M-1\right)\pi /M}{\int }}\mathrm{exp}\left(-\frac{k{E}_{b}}{{N}_{0}}\frac{{\mathrm{sin}}^{2}\left[\pi /M\right]}{{\mathrm{sin}}^{2}\theta }\right)d\theta$`

This expression is similar, but not strictly equal, to the exact BER (from  and equation 8.29 from ):

`${P}_{b}=\frac{1}{k}\left(\sum _{i=1}^{M/2}\left({w}_{i}^{\text{'}}\right){P}_{i}\right)$`

where ${w}_{i}^{\text{'}}={w}_{i}+{w}_{M-i}$, ${w}_{M/2}^{\text{'}}={w}_{M/2}$, ${w}_{i}$ is the Hamming weight of bits assigned to symbol i,

`$\begin{array}{c}{P}_{i}=\frac{1}{2\pi }\underset{0}{\overset{\pi \left(1-\left(2i-1\right)/M\right)}{\int }}\mathrm{exp}\left(-\frac{k{E}_{b}}{{N}_{0}}\frac{{\mathrm{sin}}^{2}\left[\left(2i-1\right)\pi /M\right]}{{\mathrm{sin}}^{2}\theta }\right)d\theta \\ -\frac{1}{2\pi }\underset{0}{\overset{\pi \left(1-\left(2i+1\right)/M\right)}{\int }}\mathrm{exp}\left(-\frac{k{E}_{b}}{{N}_{0}}\frac{{\mathrm{sin}}^{2}\left[\left(2i+1\right)\pi /M\right]}{{\mathrm{sin}}^{2}\theta }\right)d\theta \end{array}$`

For M-PSK with M = 2, specifically BPSK, this equation 5.2-57 from  applies:

`${P}_{s}={P}_{b}=Q\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)$`

For M-PSK with M = 4, specifically QPSK, these equations 5.2-59 and 5.2-62 from  apply:

`$\begin{array}{c}{P}_{s}=2Q\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)\left[1-\frac{1}{2}Q\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)\right]\\ {P}_{b}=Q\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)\end{array}$`

#### DE-M-PSK

For DE-M-PSK with M = 2, specifically DE-BPSK, this equation 8.36 from  applies:

`${P}_{s}={P}_{b}=2Q\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)-2{Q}^{2}\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)$`

For DE-M-PSK with M = 4, specifically DE-QPSK, this equation 8.38 from  applies:

`${P}_{s}=4Q\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)-8{Q}^{2}\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)+8{Q}^{3}\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)-4{Q}^{4}\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)$`

From equation 5 in ,

`${P}_{b}=2Q\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)\left[1-Q\left(\sqrt{\frac{2{E}_{b}}{{N}_{0}}}\right)\right]$`

#### OQPSK

For OQPSK, use the same BER and SER computations as for QPSK in .

#### DE-OQPSK

For OQPSK, use the same BER and SER computations as for DE-QPSK in .

#### M-DPSK

For M-DPSK, this equation 8.84 from  applies:

`${P}_{s}=\frac{\mathrm{sin}\left(\pi /M\right)}{2\pi }\underset{-\pi /2}{\overset{\pi /2}{\int }}\frac{\mathrm{exp}\left(-\left(k{E}_{b}/{N}_{0}\right)\left(1-\mathrm{cos}\left(\pi /M\right)\mathrm{cos}\theta \right)\right)}{1-\mathrm{cos}\left(\pi /M\right)\mathrm{cos}\theta }d\theta$`

This expression is similar, but not strictly equal, to the exact BER (from ):

`${P}_{b}=\frac{1}{k}\left(\sum _{i=1}^{M/2}\left({w}_{i}^{\text{'}}\right){A}_{i}\right)$`

where ${w}_{i}^{\text{'}}={w}_{i}+{w}_{M-i}$, ${w}_{M/2}^{\text{'}}={w}_{M/2}$, ${w}_{i}$ is the Hamming weight of bits assigned to symbol i,

`$\begin{array}{l}{A}_{i}=F\left(\left(2i+1\right)\frac{\pi }{M}\right)-F\left(\left(2i-1\right)\frac{\pi }{M}\right)\\ F\left(\psi \right)=-\frac{\mathrm{sin}\psi }{4\pi }\underset{-\pi /2}{\overset{\pi /2}{\int }}\frac{\mathrm{exp}\left(-k{E}_{b}/{N}_{0}\left(1-\mathrm{cos}\psi \mathrm{cos}t\right)\right)}{1-\mathrm{cos}\psi \mathrm{cos}t}dt\end{array}$`

For M-DPSK with M = 2, this equation 8.85 from  applies:

`${P}_{b}=\frac{1}{2}\mathrm{exp}\left(-\frac{{E}_{b}}{{N}_{0}}\right)$`

#### M-PAM

From equations 8.3 and 8.7 in  and equation 5.2-46 in ,

`${P}_{s}=2\left(\frac{M-1}{M}\right)Q\left(\sqrt{\frac{6}{{M}^{2}-1}\frac{k{E}_{b}}{{N}_{0}}}\right)$`

From ,

`$\begin{array}{c}{P}_{b}=\frac{2}{M{\mathrm{log}}_{2}M}×\\ \sum _{k=1}^{{\mathrm{log}}_{2}M}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\sum _{i=0}^{\left(1-{2}^{-k}\right)M-1}\left\{{\left(-1\right)}^{⌊\frac{i{2}^{k-1}}{M}⌋}\left({2}^{k-1}-⌊\frac{i{2}^{k-1}}{M}+\frac{1}{2}⌋\right)Q\left(\left(2i+1\right)\sqrt{\frac{6{\mathrm{log}}_{2}M}{{M}^{2}-1}\frac{{E}_{b}}{{N}_{0}}}\right)\right\}\end{array}$`

#### M-QAM

For square M-QAM, $k={\mathrm{log}}_{2}M$ is even, so equation 8.10 from  and equations 5.2-78 and 5.2-79 from  apply:

`${P}_{s}=4\frac{\sqrt{M}-1}{\sqrt{M}}Q\left(\sqrt{\frac{3}{M-1}\frac{k{E}_{b}}{{N}_{0}}}\right)-4{\left(\frac{\sqrt{M}-1}{\sqrt{M}}\right)}^{2}{Q}^{2}\left(\sqrt{\frac{3}{M-1}\frac{k{E}_{b}}{{N}_{0}}}\right)$`

From ,

`$\begin{array}{c}{P}_{b}=\frac{2}{\sqrt{M}{\mathrm{log}}_{2}\sqrt{M}}\\ ×\sum _{k=1}^{{\mathrm{log}}_{2}\sqrt{M}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\sum _{i=0}^{\left(1-{2}^{-k}\right)\sqrt{M}-1}\left\{{\left(-1\right)}^{⌊\frac{i{2}^{k-1}}{\sqrt{M}}⌋}\left({2}^{k-1}-⌊\frac{i{2}^{k-1}}{\sqrt{M}}+\frac{1}{2}⌋\right)Q\left(\left(2i+1\right)\sqrt{\frac{6{\mathrm{log}}_{2}M}{2\left(M-1\right)}\frac{{E}_{b}}{{N}_{0}}}\right)\right\}\end{array}$`

For rectangular (non-square) M-QAM, $k={\mathrm{log}}_{2}M$ is odd, $M=I×J$, $I={2}^{\frac{k-1}{2}}$, and $J={2}^{\frac{k+1}{2}}$. So that,

`$\begin{array}{c}{P}_{s}=\frac{4IJ-2I-2J}{M}\\ ×Q\left(\sqrt{\frac{6{\mathrm{log}}_{2}\left(IJ\right)}{\left({I}^{2}+{J}^{2}-2\right)}\frac{{E}_{b}}{{N}_{0}}}\right)-\frac{4}{M}\left(1+IJ-I-J\right){Q}^{2}\left(\sqrt{\frac{6{\mathrm{log}}_{2}\left(IJ\right)}{\left({I}^{2}+{J}^{2}-2\right)}\frac{{E}_{b}}{{N}_{0}}}\right)\end{array}$`

From ,

`${P}_{b}=\frac{1}{{\mathrm{log}}_{2}\left(IJ\right)}\left(\sum _{k=1}^{{\mathrm{log}}_{2}I}{P}_{I}\left(k\right)+\sum _{l=1}^{{\mathrm{log}}_{2}J}{P}_{J}\left(l\right)\right)$`

where

`${P}_{I}\left(k\right)=\frac{2}{I}\sum _{i=0}^{\left(1-{2}^{-k}\right)I-1}\left\{{\left(-1\right)}^{⌊\frac{i{2}^{k-1}}{I}⌋}\left({2}^{k-1}-⌊\frac{i{2}^{k-1}}{I}+\frac{1}{2}⌋\right)Q\left(\left(2i+1\right)\sqrt{\frac{6{\mathrm{log}}_{2}\left(IJ\right)}{{I}^{2}+{J}^{2}-2}\frac{{E}_{b}}{{N}_{0}}}\right)\right\}$`

and

`${P}_{J}\left(k\right)=\frac{2}{J}\sum _{j=0}^{\left(1-{2}^{-l}\right)J-1}\left\{{\left(-1\right)}^{⌊\frac{j{2}^{l-1}}{J}⌋}\left({2}^{l-1}-⌊\frac{j{2}^{l-1}}{J}+\frac{1}{2}⌋\right)Q\left(\left(2j+1\right)\sqrt{\frac{6{\mathrm{log}}_{2}\left(IJ\right)}{{I}^{2}+{J}^{2}-2}\frac{{E}_{b}}{{N}_{0}}}\right)\right\}$`

#### Orthogonal M-FSK with Coherent Detection

From equation 8.40 in  and equation 5.2-21 in ,

`$\begin{array}{l}{P}_{s}=1-\underset{-\infty }{\overset{\infty }{\int }}{\left[Q\left(-q-\sqrt{\frac{2k{E}_{b}}{{N}_{0}}}\right)\right]}^{M-1}\frac{1}{\sqrt{2\pi }}\mathrm{exp}\left(-\frac{{q}^{2}}{2}\right)dq\\ {P}_{b}=\frac{{2}^{k-1}}{{2}^{k}-1}{P}_{s}\end{array}$`

#### Nonorthogonal 2-FSK with Coherent Detection

For $M=2$, equation 5.2-21 in  and equation 8.44 in  apply:

`${P}_{s}={P}_{b}=Q\left(\sqrt{\frac{{E}_{b}\left(1-\mathrm{Re}\left[\rho \right]\right)}{{N}_{0}}}\right)$`

$\rho$ is the complex correlation coefficient, such that:

`$\rho =\frac{1}{2{E}_{b}}\underset{0}{\overset{{T}_{b}}{\int }}{\stackrel{˜}{s}}_{1}\left(t\right){\stackrel{˜}{s}}_{2}^{*}\left(t\right)dt$`

where ${\stackrel{˜}{s}}_{1}\left(t\right)$ and ${\stackrel{˜}{s}}_{2}\left(t\right)$ are complex lowpass signals, and

`${E}_{b}=\frac{1}{2}\underset{0}{\overset{{T}_{b}}{\int }}{|{\stackrel{˜}{s}}_{1}\left(t\right)|}^{2}dt=\frac{1}{2}\underset{0}{\overset{{T}_{b}}{\int }}{|{\stackrel{˜}{s}}_{2}\left(t\right)|}^{2}dt$`

For example, with

then

`$\begin{array}{c}\rho =\frac{1}{2{E}_{b}}\underset{0}{\overset{{T}_{b}}{\int }}\sqrt{\frac{2{E}_{b}}{{T}_{b}}}{e}^{j2\pi {f}_{1}t}\sqrt{\frac{2{E}_{b}}{{T}_{b}}}{e}^{-j2\pi {f}_{2}t}dt=\frac{1}{{T}_{b}}\underset{0}{\overset{{T}_{b}}{\int }}{e}^{j2\pi \left({f}_{1}-{f}_{2}\right)t}dt\\ =\frac{\mathrm{sin}\left(\pi \Delta f{T}_{b}\right)}{\pi \Delta f{T}_{b}}{e}^{j\pi \Delta ft}\end{array}$`

where $\Delta f={f}_{1}-{f}_{2}$.

From equation 8.44 in ,

where $h=\Delta f{T}_{b}$.

#### Orthogonal M-FSK with Noncoherent Detection

From equation 5.4-46 in  and equation 8.66 in ,

`$\begin{array}{l}{P}_{s}=\sum _{m=1}^{M-1}{\left(-1\right)}^{m+1}\left(\begin{array}{c}M-1\\ m\end{array}\right)\frac{1}{m+1}\mathrm{exp}\left[-\frac{m}{m+1}\frac{k{E}_{b}}{{N}_{0}}\right]\\ {P}_{b}=\frac{1}{2}\frac{M}{M-1}{P}_{s}\end{array}$`

#### Nonorthogonal 2-FSK with Noncoherent Detection

For $M=2$, this equation 5.4-53 from  and this equation 8.69 from  apply:

`${P}_{s}={P}_{b}=Q\left(\sqrt{a},\sqrt{b}\right)-\frac{1}{2}\mathrm{exp}\left(-\frac{a+b}{2}\right){I}_{0}\left(\sqrt{ab}\right)$`

where

#### Precoded MSK with Coherent Detection

Use the same BER and SER computations as for BPSK.

#### Differentially Encoded MSK with Coherent Detection

Use the same BER and SER computations as for DE-BPSK.

#### MSK with Noncoherent Detection (Optimum Block-by-Block)

The upper bound on error rate from equations 10.166 and 10.164 in ) is

`$\begin{array}{c}{P}_{s}={P}_{b}\\ \le \frac{1}{2}\left[1-Q\left(\sqrt{{b}_{1}},\sqrt{{a}_{1}}\right)+Q\left(\sqrt{{a}_{1}},\sqrt{{b}_{1}}\right)\right]+\frac{1}{4}\left[1-Q\left(\sqrt{{b}_{4}},\sqrt{{a}_{4}}\right)+Q\left(\sqrt{{a}_{4}},\sqrt{{b}_{4}}\right)\right]+\frac{1}{2}{e}^{-\frac{{E}_{b}}{{N}_{0}}}\end{array}$`

where

`$\begin{array}{cc}{a}_{1}=\frac{{E}_{b}}{{N}_{0}}\left(1-\sqrt{\frac{3-4/{\pi }^{2}}{4}}\right),& {b}_{1}=\frac{{E}_{b}}{{N}_{0}}\left(1+\sqrt{\frac{3-4/{\pi }^{2}}{4}}\right)\\ {a}_{4}=\frac{{E}_{b}}{{N}_{0}}\left(1-\sqrt{1-4/{\pi }^{2}}\right),& {b}_{4}=\frac{{E}_{b}}{{N}_{0}}\left(1+\sqrt{1-4/{\pi }^{2}}\right)\end{array}$`

#### CPFSK Coherent Detection (Optimum Block-by-Block)

The lower bound on error rate (from equation 5.3-17 in ) is

`${P}_{s}>{K}_{{\delta }_{\mathrm{min}}}Q\left(\sqrt{\frac{{E}_{b}}{{N}_{0}}{\delta }_{\mathrm{min}}^{2}}\right)$`

The upper bound on error rate is

`${\delta }_{\mathrm{min}}^{2}>\underset{1\le i\le M-1}{\mathrm{min}}\left\{2i\left(1-\text{sinc}\left(2ih\right)\right)\right\}$`

where h is the modulation index, and ${K}_{{\delta }_{\mathrm{min}}}$ is the number of paths with the minimum distance.

`${P}_{b}\cong \frac{{P}_{s}}{k}$`

### Analytical Expressions Used in `berfading` Function and Bit Error Rate Analysis App

This section covers the main analytical expressions used in the `berfading` function and the Bit Error Rate Analysis app.

#### Notation

This table describes the additional notations used in analytical expressions in this section.

Description Notation
Power of the fading amplitude r$\Omega =E\left[{r}^{2}\right]$, where $E\left[\cdot \right]$ denotes statistical expectation
Number of diversity branches

`$L$`

Signal to Noise Ratio (SNR) per symbol per branch

`${\overline{\gamma }}_{l}=\left({\Omega }_{l}\frac{{E}_{s}}{{N}_{0}}\right)/L=\left({\Omega }_{l}\frac{k{E}_{b}}{{N}_{0}}\right)/L$`

For identically-distributed diversity branches,

`$\overline{\gamma }=\left(\Omega \frac{k{E}_{b}}{{N}_{0}}\right)/L$`

Moment generating functions for each diversity branch

`${M}_{{\gamma }_{l}}\left(s\right)=\frac{1}{1-s{\overline{\gamma }}_{l}}$`

`${M}_{{\gamma }_{l}}\left(s\right)=\frac{1+K}{1+K-s{\overline{\gamma }}_{l}}{e}^{\left[\frac{Ks{\overline{\gamma }}_{l}}{\left(1+K\right)-s{\overline{\gamma }}_{l}}\right]}$`

K is the ratio of the energy in the specular component to the energy in the diffuse component (linear scale).

For identically-distributed diversity branches,${M}_{{\gamma }_{l}}\left(s\right)={M}_{\gamma }\left(s\right)$ for all l.

This table defines the additional acronyms used in this section.

Acronym Definition
MRCMaximal-ratio combining
EGCEqual-gain combining

#### M-PSK with MRC

From equation 9.15 in ,

`${P}_{s}=\frac{1}{\pi }\underset{0}{\overset{\left(M-1\right)\pi /M}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{{\mathrm{sin}}^{2}\left(\pi /M\right)}{{\mathrm{sin}}^{2}\theta }\right)d\theta$`

From  and ,

`${P}_{b}=\frac{1}{k}\left(\sum _{i=1}^{M/2}\left({w}_{i}^{\text{'}}\right){\overline{P}}_{i}\right)$`

where ${w}_{i}^{\text{'}}={w}_{i}+{w}_{M-i}$, ${w}_{M/2}^{\text{'}}={w}_{M/2}$, ${w}_{i}$ is the Hamming weight of bits assigned to symbol i,

`$\begin{array}{l}{\overline{P}}_{i}=\frac{1}{2\pi }\underset{0}{\overset{\pi \left(1-\left(2i-1\right)/M\right)}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{1}{{\mathrm{sin}}^{2}\theta }{\mathrm{sin}}^{2}\frac{\left(2i-1\right)\pi }{M}\right)d\theta \\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{1}{2\pi }\underset{0}{\overset{\pi \left(1-\left(2i+1\right)/M\right)}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{1}{{\mathrm{sin}}^{2}\theta }{\mathrm{sin}}^{2}\frac{\left(2i+1\right)\pi }{M}\right)d\theta \end{array}$`

For the special case of Rayleigh fading with $M=2$ (from equations C-18 and C-21 and Table C-1 in ),

`${P}_{b}=\frac{1}{2}\left[1-\mu \sum _{i=0}^{L-1}\left(\begin{array}{c}2i\\ i\end{array}\right){\left(\frac{1-{\mu }^{2}}{4}\right)}^{i}\right]$`

where

`$\mu =\sqrt{\frac{\overline{\gamma }}{\overline{\gamma }+1}}$`

If $L=1$, then:

`${P}_{b}=\frac{1}{2}\left[1-\sqrt{\frac{\overline{\gamma }}{\overline{\gamma }+1}}\right]$`

#### DE-M-PSK with MRC

For $M=2$ (from equations 8.37 and 9.8-9.11 in ),

`${P}_{s}={P}_{b}=\frac{2}{\pi }\underset{0}{\overset{\pi /2}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{1}{{\mathrm{sin}}^{2}\theta }\right)d\theta -\frac{2}{\pi }\underset{0}{\overset{\pi /4}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{1}{{\mathrm{sin}}^{2}\theta }\right)d\theta$`

#### M-PAM with MRC

From equation 9.19 in ,

`${P}_{s}=\frac{2\left(M-1\right)}{M\pi }\underset{0}{\overset{\pi /2}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{3/\left({M}^{2}-1\right)}{{\mathrm{sin}}^{2}\theta }\right)d\theta$`

From  and ,

#### M-QAM with MRC

For square M-QAM, $k={\mathrm{log}}_{2}M$ is even (equation 9.21 in ),

`$\begin{array}{c}{P}_{s}=\frac{4}{\pi }\left(1-\frac{1}{\sqrt{M}}\right)\underset{0}{\overset{\pi /2}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{3/\left(2\left(M-1\right)\right)}{{\mathrm{sin}}^{2}\theta }\right)d\theta \\ -\frac{4}{\pi }{\left(1-\frac{1}{\sqrt{M}}\right)}^{2}\underset{0}{\overset{\pi /4}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{3/\left(2\left(M-1\right)\right)}{{\mathrm{sin}}^{2}\theta }\right)d\theta \end{array}$`

From  and :

For rectangular (nonsquare) M-QAM, $k={\mathrm{log}}_{2}M$ is odd, $M=I×J$, $I={2}^{\frac{k-1}{2}}$, $J={2}^{\frac{k+1}{2}}$, ${\overline{\gamma }}_{l}={\Omega }_{l}{\mathrm{log}}_{2}\left(IJ\right)\frac{{E}_{b}}{{N}_{0}}$,

`$\begin{array}{c}{P}_{s}=\frac{4IJ-2I-2J}{M\pi }\underset{0}{\overset{\pi /2}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{3/\left({I}^{2}+{J}^{2}-2\right)}{{\mathrm{sin}}^{2}\theta }\right)d\theta \\ -\frac{4}{M\pi }\left(1+IJ-I-J\right)\underset{0}{\overset{\pi /4}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{3/\left({I}^{2}+{J}^{2}-2\right)}{{\mathrm{sin}}^{2}\theta }\right)d\theta \end{array}$`

From  and ,

`$\begin{array}{c}{P}_{b}=\frac{1}{{\mathrm{log}}_{2}\left(IJ\right)}\left(\sum _{k=1}^{{\mathrm{log}}_{2}I}{P}_{I}\left(k\right)+\sum _{l=1}^{{\mathrm{log}}_{2}J}{P}_{J}\left(l\right)\right)\\ {P}_{I}\left(k\right)=\frac{2}{I\pi }\sum _{i=0}^{\left(1-{2}^{-k}\right)I-1}\left\{{\left(-1\right)}^{⌊\frac{i{2}^{k-1}}{I}⌋}\left({2}^{k-1}-⌊\frac{i{2}^{k-1}}{I}+\frac{1}{2}⌋\right)\underset{0}{\overset{\pi /2}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{{\left(2i+1\right)}^{2}3/\left({I}^{2}+{J}^{2}-2\right)}{{\mathrm{sin}}^{2}\theta }\right)d\theta \right\}\\ {P}_{J}\left(k\right)=\frac{2}{J\pi }\sum _{j=0}^{\left(1-{2}^{-l}\right)J-1}\left\{{\left(-1\right)}^{⌊\frac{j{2}^{l-1}}{J}⌋}\left({2}^{l-1}-⌊\frac{j{2}^{l-1}}{J}+\frac{1}{2}⌋\right)\underset{0}{\overset{\pi /2}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{{\left(2j+1\right)}^{2}3/\left({I}^{2}+{J}^{2}-2\right)}{{\mathrm{sin}}^{2}\theta }\right)d\theta \right\}\end{array}$`

#### M-DPSK with Postdetection EGC

From equation 8.165 in ,

`${P}_{s}=\frac{\mathrm{sin}\left(\pi /M\right)}{2\pi }\underset{-\pi /2}{\overset{\pi /2}{\int }}\frac{1}{\left[1-\mathrm{cos}\left(\pi /M\right)\mathrm{cos}\theta \right]}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\left[1-\mathrm{cos}\left(\pi /M\right)\mathrm{cos}\theta \right]\right)d\theta$`

From  and ,

`${P}_{b}=\frac{1}{k}\left(\sum _{i=1}^{M/2}\left({w}_{i}^{\text{'}}\right){\overline{A}}_{i}\right)$`

where ${w}_{i}^{\text{'}}={w}_{i}+{w}_{M-i}$, ${w}_{M/2}^{\text{'}}={w}_{M/2}$, ${w}_{i}$ is the Hamming weight of bits assigned to symbol i,

`$\begin{array}{l}{\overline{A}}_{i}=\overline{F}\left(\left(2i+1\right)\frac{\pi }{M}\right)-\overline{F}\left(\left(2i-1\right)\frac{\pi }{M}\right)\\ \overline{F}\left(\psi \right)=-\frac{\mathrm{sin}\psi }{4\pi }\underset{-\pi /2}{\overset{\pi /2}{\int }}\frac{1}{\left(1-\mathrm{cos}\psi \mathrm{cos}t\right)}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\left(1-\mathrm{cos}\psi \mathrm{cos}t\right)\right)dt\end{array}$`

For the special case of Rayleigh fading with $M=2$ and $L=1$ (equation 8.173 from ),

`${P}_{b}=\frac{1}{2\left(1+\overline{\gamma }\right)}$`

#### Orthogonal 2-FSK, Coherent Detection with MRC

From equation 9.11 in ,

`${P}_{s}={P}_{b}=\frac{1}{\pi }\underset{0}{\overset{\pi /2}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{1/2}{{\mathrm{sin}}^{2}\theta }\right)d\theta$`

For the special case of Rayleigh fading (equations 14.4-15 and 14.4-21 in ),

`${P}_{s}={P}_{b}\text{​}=\frac{1}{{2}^{L}}{\left(1-\sqrt{\frac{\overline{\gamma }}{2+\overline{\gamma }}}\right)}^{L}\sum _{k=0}^{L-1}\left(\begin{array}{c}L-1+k\\ k\end{array}\right)\frac{1}{{2}^{k}}{\left(1+\sqrt{\frac{\overline{\gamma }}{2+\overline{\gamma }}}\right)}^{k}$`

#### Nonorthogonal 2-FSK, Coherent Detection with MRC

From equations 9.11 and 8.44 in ,

`${P}_{s}={P}_{b}=\frac{1}{\pi }\underset{0}{\overset{\pi /2}{\int }}\prod _{l=1}^{L}{M}_{{\gamma }_{l}}\left(-\frac{\left(1-\mathrm{Re}\left[\rho \right]\right)/2}{{\mathrm{sin}}^{2}\theta }\right)d\theta$`

For the special case of Rayleigh fading with $L=1$ (equations 20 in  and 8.130 in ),

`${P}_{s}={P}_{b}=\frac{1}{2}\left[1-\sqrt{\frac{\overline{\gamma }\left(1-\mathrm{Re}\left[\rho \right]\right)}{2+\overline{\gamma }\left(1-\mathrm{Re}\left[\rho \right]\right)}}\right]$`

#### Orthogonal M-FSK, Noncoherent Detection with EGC

For Rayleigh fading, from equation 14.4-47 in ,

`$\begin{array}{l}{P}_{s}\text{​}=1-\underset{0}{\overset{\infty }{\int }}\frac{1}{{\left(1+\overline{\gamma }\right)}^{L}\left(L-1\right)!}{U}^{L-1}{e}^{-\frac{U}{1+\overline{\gamma }}}{\left(1-{e}^{-U}\sum _{k=0}^{L-1}\frac{{U}^{k}}{k!}\right)}^{M-1}dU\\ {P}_{b}=\frac{1}{2}\frac{M}{M-1}{P}_{s}\end{array}$`

For Rician fading from equation 41 in ,

`$\begin{array}{l}{P}_{s}=\sum _{r=1}^{M-1}\frac{{\left(-1\right)}^{r+1}{e}^{-LK{\overline{\gamma }}_{r}/\left(1+{\overline{\gamma }}_{r}\right)}}{{\left(r\left(1+{\overline{\gamma }}_{r}\right)+1\right)}^{L}}\left(\begin{array}{c}M-1\\ r\end{array}\right)\sum _{n=0}^{r\left(L-1\right)}{\beta }_{nr}\frac{\Gamma \left(L+n\right)}{\Gamma \left(L\right)}{\left[\frac{1+{\overline{\gamma }}_{r}}{r+1+r{\overline{\gamma }}_{r}}\right]}^{n}{}_{1}F{}_{1}\left(L+n,L;\frac{LK{\overline{\gamma }}_{r}/\left(1+{\overline{\gamma }}_{r}\right)}{r\left(1+{\overline{\gamma }}_{r}\right)+1}\right)\\ {P}_{b}=\frac{1}{2}\frac{M}{M-1}{P}_{s}\end{array}$`

where

`$\begin{array}{c}{\overline{\gamma }}_{r}=\frac{1}{1+K}\overline{\gamma }\\ {\beta }_{nr}=\sum _{i=n-\left(L-1\right)}^{n}\frac{{\beta }_{i\left(r-1\right)}}{\left(n-i\right)!}{I}_{\left[0,\text{\hspace{0.17em}}\left(r-1\right)\left(L-1\right)\right]}\left(i\right)\\ {\beta }_{00}={\beta }_{0r}=1\\ {\beta }_{n1}=1/n!\\ {\beta }_{1r}=r\end{array}$`

and ${I}_{\left[a,b\right]}\left(i\right)=1$ if $a\le i\le b$ and 0 otherwise.

#### Nonorthogonal 2-FSK, Noncoherent Detection with No Diversity

From equation 8.163 in ,

`${P}_{s}={P}_{b}=\frac{1}{4\pi }\underset{-\pi }{\overset{\pi }{\int }}\frac{1-{\varsigma }^{2}}{1+2\varsigma \mathrm{sin}\theta +{\varsigma }^{2}}{M}_{\gamma }\left(-\frac{1}{4}\left(1+\sqrt{1-{\rho }^{2}}\right)\left(1+2\varsigma \mathrm{sin}\theta +{\varsigma }^{2}\right)\right)d\theta$`

where

`$\varsigma =\sqrt{\frac{1-\sqrt{1-{\rho }^{2}}}{1+\sqrt{1-{\rho }^{2}}}}$`

### Analytical Expressions Used in `bercoding` Function and Bit Error Rate Analysis App

This section covers the main analytical expressions used in the `bercoding` function and the Bit Error Rate Analysis app.

#### Common Notation

This table describes the additional notations used in analytical expressions in this section.

DescriptionNotation
Energy-per-information bit-to-noise power-spectral-density ratio

`${\gamma }_{b}=\frac{{E}_{b}}{{N}_{0}}$`

Message length

$K$

Code length

$N$

Code rate

`${R}_{c}=\frac{K}{N}$`

#### Block Coding

This section describes the specific notation for block coding expressions, where ${d}_{\mathrm{min}}$ is the minimum distance of the code.

Soft Decision

For BPSK, QPSK, OQPSK, 2-PAM, 4-QAM, and precoded MSK, equation 8.1-52 in ) applies,

`${P}_{b}\le \frac{1}{2}\left({2}^{K}-1\right)Q\left(\sqrt{2{\gamma }_{b}{R}_{c}{d}_{\mathrm{min}}}\right)$`

For DE-BPSK, DE-QPSK, DE-OQPSK, and DE-MSK,

`${P}_{b}\le \frac{1}{2}\left({2}^{K}-1\right)\left[2Q\left(\sqrt{2{\gamma }_{b}{R}_{c}{d}_{\mathrm{min}}}\right)\left[1-Q\left(\sqrt{2{\gamma }_{b}{R}_{c}{d}_{\mathrm{min}}}\right)\right]\right]$`

For BFSK coherent detection, equations 8.1-50 and 8.1-58 in  apply,

`${P}_{b}\le \frac{1}{2}\left({2}^{K}-1\right)Q\left(\sqrt{{\gamma }_{b}{R}_{c}{d}_{\mathrm{min}}}\right)$`

For BFSK noncoherent square-law detection, equations 8.1-65 and 8.1-64 in  apply,

`${P}_{b}\le \frac{1}{2}\frac{{2}^{K}-1}{{2}^{2{d}_{\mathrm{min}}-1}}\mathrm{exp}\left(-\frac{1}{2}{\gamma }_{b}{R}_{c}{d}_{\mathrm{min}}\right)\sum _{i=0}^{{d}_{\mathrm{min}}-1}{\left(\frac{1}{2}{\gamma }_{b}{R}_{c}{d}_{\mathrm{min}}\right)}^{i}\frac{1}{i!}\sum _{r=0}^{{d}_{\mathrm{min}}-1-i}\left(\begin{array}{c}2{d}_{\mathrm{min}}-1\\ r\end{array}\right)$`

For DPSK,

`${P}_{b}\le \frac{1}{2}\frac{{2}^{K}-1}{{2}^{2{d}_{\mathrm{min}}-1}}\mathrm{exp}\left(-{\gamma }_{b}{R}_{c}{d}_{\mathrm{min}}\right)\sum _{i=0}^{{d}_{\mathrm{min}}-1}{\left({\gamma }_{b}{R}_{c}{d}_{\mathrm{min}}\right)}^{i}\frac{1}{i!}\sum _{r=0}^{{d}_{\mathrm{min}}-1-i}\left(\begin{array}{c}2{d}_{\mathrm{min}}-1\\ r\end{array}\right)$`

Hard Decision

For general linear block code, equations 4.3 and 4.4 in , and 12.136 in  apply,

`$\begin{array}{l}{P}_{b}\le \frac{1}{N}\sum _{m=t+1}^{N}\left(m+t\right)\left(\begin{array}{c}N\\ m\end{array}\right){p}^{m}{\left(1-p\right)}^{N-m}\\ t=⌊\frac{1}{2}\left({d}_{\mathrm{min}}-1\right)⌋\end{array}$`

For Hamming code, equations 4.11 and 4.12 in  and 6.72 and 6.73 in  apply

`${P}_{b}\approx \frac{1}{N}\sum _{m=2}^{N}m\left(\begin{array}{c}N\\ m\end{array}\right){p}^{m}{\left(1-p\right)}^{N-m}=p-p{\left(1-p\right)}^{N-1}$`

For rate (24,12) extended Golay code, equations 4.17 in  and 12.139 in  apply:

`${P}_{b}\le \frac{1}{24}\sum _{m=4}^{24}{\beta }_{m}\left(\begin{array}{c}24\\ m\end{array}\right){p}^{m}{\left(1-p\right)}^{24-m}$`

where ${\beta }_{m}$ is the average number of channel symbol errors that remain in corrected N-tuple format when the channel caused m symbol errors (see table 4.2 in ).

For Reed-Solomon code with $N=Q-1={2}^{q}-1$,

`${P}_{b}\approx \frac{{2}^{q-1}}{{2}^{q}-1}\frac{1}{N}\sum _{m=t+1}^{N}m\left(\begin{array}{c}N\\ m\end{array}\right){\left({P}_{s}\right)}^{m}{\left(1-{P}_{s}\right)}^{N-m}$`

For FSK, equations 4.25 and 4.27 in , 8.1-115 and 8.1-116 in , 8.7 and 8.8 in , and 12.142 and 12.143 in  apply,

`${P}_{b}\approx \frac{1}{q}\frac{1}{N}\sum _{m=t+1}^{N}m\left(\begin{array}{c}N\\ m\end{array}\right){\left({P}_{s}\right)}^{m}{\left(1-{P}_{s}\right)}^{N-m}$`

otherwise, if ${\mathrm{log}}_{2}Q/{\mathrm{log}}_{2}M=q/k=h$, where h is an integer (equation 1 in ) applies,

`${P}_{s}=1-{\left(1-s\right)}^{h}$`

where s is the SER in an uncoded AWGN channel.

For example, for BPSK, $M=2$ and ${P}_{s}=1-{\left(1-s\right)}^{q}$, otherwise ${P}_{s}$ is given by table 1 and equation 2 in .

#### Convolutional Coding

This section describes the specific notation for convolutional coding expressions, where ${d}_{free}$ is the free distance of the code, and ${a}_{d}$ is the number of paths of distance d from the all-zero path that merges with the all-zero path for the first time.

Soft Decision

From equations 8.2-26, 8.2-24, and 8.2-25 in  and 13.28 and 13.27 in  apply,

`${P}_{b}<\sum _{d={d}_{free}}^{\infty }{a}_{d}f\left(d\right){P}_{2}\left(d\right)$`

The transfer function is given by

`$\begin{array}{l}T\left(D,N\right)=\sum _{d={d}_{free}}^{\infty }{a}_{d}{D}^{d}{N}^{f\left(d\right)}\\ {\frac{dT\left(D,N\right)}{dN}|}_{N=1}=\sum _{d={d}_{free}}^{\infty }{a}_{d}f\left(d\right){D}^{d}\end{array}$`

where $f\left(d\right)$ is the exponent of N as a function of d.

This equation gives the results for BPSK, QPSK, OQPSK, 2-PAM, 4-QAM, precoded MSK, DE-BPSK, DE-QPSK, DE-OQPSK, DE-MSK, DPSK, and BFSK:

`${P}_{2}\left(d\right)={{P}_{b}|}_{\frac{{E}_{b}}{{N}_{0}}={\gamma }_{b}{R}_{c}d}$`

where ${P}_{b}$ is the BER in the corresponding uncoded AWGN channel. For example, for BPSK (equation 8.2-20 in ),

`${P}_{2}\left(d\right)=Q\left(\sqrt{2{\gamma }_{b}{R}_{c}d}\right)$`

Hard Decision

From equations 8.2-33, 8.2-28, and 8.2-29 in  and 13.28, 13.24, and 13.25 in  apply,

`${P}_{b}<\sum _{d={d}_{free}}^{\infty }{a}_{d}f\left(d\right){P}_{2}\left(d\right)$`

When d is odd,

`${P}_{2}\left(d\right)=\sum _{k=\left(d+1\right)/2}^{d}\left(\begin{array}{c}d\\ k\end{array}\right){p}^{k}{\left(1-p\right)}^{d-k}$`

and when d is even,

`${P}_{2}\left(d\right)=\sum _{k=d/2+1}^{d}\left(\begin{array}{c}d\\ k\end{array}\right){p}^{k}{\left(1-p\right)}^{d-k}+\frac{1}{2}\left(\begin{array}{c}d\\ d/2\end{array}\right){p}^{d/2}{\left(1-p\right)}^{d/2}$`

where p is the bit error rate (BER) in an uncoded AWGN channel.

### Analytical Expressions Used in `bersync` Function and Bit Error Rate Analysis App

This section covers the main analytical expressions used in the `bersync` function and the Bit Error Rate Analysis app.

#### Timing Synchronization Error

To compute the BER for a communications system with a timing synchronization error, the `bersync` function uses this formula from :

`$\frac{1}{4\pi \sigma }{\int }_{-\infty }^{\infty }\mathrm{exp}\left(-\frac{{\xi }^{2}}{2{\sigma }^{2}}\right){\int }_{\sqrt{2R}\left(1-2|\xi |\right)}^{\infty }\mathrm{exp}\left(-\frac{{x}^{2}}{2}\right)dxd\xi +\frac{1}{2\sqrt{2\pi }}{\int }_{\sqrt{2R}}^{\infty }\mathrm{exp}\left(-\frac{{x}^{2}}{2}\right)dx$`

where σ is the timing error, and R is the linear Eb/N0 value.

#### Timing Synchronization Error

To compute the BER for a communications system with a carrier synchronization error, the `bersync` function uses this formula from :

`$\frac{1}{\pi \sigma }{\int }_{0}^{\infty }\mathrm{exp}\left(-\frac{{\varphi }^{2}}{2{\sigma }^{2}}\right){\int }_{\sqrt{2R}\mathrm{cos}\varphi }^{\infty }\mathrm{exp}\left(-\frac{{y}^{2}}{2}\right)dyd\varphi$`

where σ is the phase error R is the linear Eb/N0 value.