# bersync

Bit error rate (BER) for imperfect synchronization

## Syntax

`ber = bersync(EbNo,timerr,'timing') ber = bersync(EbNo,phaserr,'carrier')`

## Alternatives

As an alternative to the `bersync` function, invoke the BERTool GUI (`bertool`) and use the Theoretical tab.

## Description

`ber = bersync(EbNo,timerr,'timing') ` returns the BER of uncoded coherent binary phase shift keying (BPSK) modulation over an additive white Gaussian noise (AWGN) channel with imperfect timing. The normalized timing error is assumed to have a Gaussian distribution. `EbNo` is the ratio of bit energy to noise power spectral density, in dB. If `EbNo` is a vector, the output `ber` is a vector of the same size, whose elements correspond to the different Eb/N0 levels. `timerr` is the standard deviation of the timing error, normalized to the symbol interval. `timerr` must be between 0 and 0.5.

`ber = bersync(EbNo,phaserr,'carrier')` returns the BER of uncoded BPSK modulation over an AWGN channel with a noisy phase reference. The phase error is assumed to have a Gaussian distribution. `phaserr` is the standard deviation of the error in the reference carrier phase, in radians.

## Examples

The code below computes the BER of coherent BPSK modulation over an AWGN channel with imperfect timing. The example varies both `EbNo` and `timerr`. (When `timerr` assumes the final value of zero, the `bersync` command produces the same result as `berawgn(EbNo,'psk',2)`.)

```EbNo = [4 8 12]; timerr = [0.2 0.07 0]; ber = zeros(length(timerr), length(EbNo)); for ii = 1:length(timerr) ber(ii,:) = bersync(EbNo, timerr(ii),'timerr'); end % Display result using scientific notation. format short e; ber format; % Switch back to default notation format.```

The output is below, where each row corresponds to a different value of `timerr` and each column corresponds to a different value of `EbNo`.

```ber = 5.2073e-002 2.0536e-002 1.1160e-002 1.8948e-002 7.9757e-004 4.9008e-006 1.2501e-002 1.9091e-004 9.0060e-009 ```

## Limitations

The numerical accuracy of this function's output is limited by

• Approximations in the analysis leading to the closed-form expressions that the function uses

• Approximations related to the numerical implementation of the expressions

You can generally rely on the first couple of significant digits of the function's output.

### Limitations Related to Extreme Values of Input Arguments

Inherent limitations in numerical precision force the function to assume perfect synchronization if the value of `timerr` or `phaserr` is very small. The table below indicates how the function behaves under these conditions.

ConditionBehavior of Function
`timerr < eps``bersync(EbNo,timerr,'timing')` defined as `berawgn(EbNo,'psk',2)`
`phaserr < eps``bersync(EbNo,phaserr,'carrier')` defined as `berawgn(EbNo,'psk',2)`

collapse all

### Algorithms

This function uses formulas from [3].

When the last input is `'timing'`, the function computes

$\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 `timerr` input and R is the value of `EbNo` converted from dB to a linear scale.

When the last input is `'carrier'`, the function computes

$\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 `phaserr` input and R is the value of `EbNo` converted from dB to a linear scale.

## References

[1] Jeruchim, Michel C., Philip Balaban, and K. Sam Shanmugan, Simulation of Communication Systems, Second Edition, New York, Kluwer Academic/Plenum, 2000.

[2] Sklar, Bernard, Digital Communications: Fundamentals and Applications, Second Edition, Upper Saddle River, NJ, Prentice-Hall, 2001.

[3] Stiffler, J. J., Theory of Synchronous Communications, Englewood Cliffs, NJ, Prentice-Hall, 1971.

Get trial now