BER for coded AWGN channels
bercoding function returns an upper bound or
approximation of the bit error rate (BER) for coherent BPSK or QPSK modulation over an
additive white Gaussian noise (AWGN) channel for a specified coding type, decoding
decision, code rate, and distance spectrum of the code. The results for binary PSK and
quadrature PSK modulation are the same. This function computes only modulation order 2
or 4 for M-ary PSK modulation. For more information, see Analytical Expressions Used in bercoding Function and Bit Error Rate Analysis App.
returns the upper bound of the BER for an the extended (24, 12) Golay code using
hard-decision decoding and coherent BPSK modulation. In accordance with , the Golay coding upper bound assumes only the correction of 3-error
patterns. Even though correcting approximately 19% of 4-error patterns is
theoretically possible in practice, most decoders do not have this
ber = bercoding(EbNo,'Golay','hard',24)
Find the upper bound of the theoretical BER for a (23,12) block code.
Set the codeword length, message length, minimum distance, and range in dB.
n = 23; % Codeword length k = 12; % Message length dmin = 7; % Minimum distance EbNo = 1:10; % Eb/No range (dB)
Estimate the BER.
berBlk = bercoding(EbNo,'block','hard',n,k,dmin);
Plot the estimated BER.
berfit(EbNo,berBlk) ylabel('Bit Error Probability') title('BER Upper Bound vs. Eb/No with Best Curve Fit')
Estimate the BER performance in an AWGN channel for a 16-QAM signal when encoded with a (15,11) Reed-Solomon code using hard-decision decoding.
Set the input Eb/No range and find the uncoded BER for 16-QAM.
ebno = (2:12)'; uncodedBER = berawgn(ebno,'qam',16);
Estimate the coded BER for a 16-QAM signal with a (15,11) Reed-Solomon code using hard-decision decoding.
codedBER = bercoding(ebno,'RS','hard',15,11,'qam',16);
Plot the estimated BER curves.
semilogy(ebno,[uncodedBER codedBER]) grid title('Compare Uncoded and R-S Coded 16-QAM Transmission') legend('Uncoded BER','Coded BER') xlabel('Eb/No (dB)') ylabel('BER')
EbNo— Energy per bit to noise power spectral density ratio
Energy per bit to noise power spectral density ratio in dB, specified as a scalar or vector.
coding— Source coding type
Source coding type, specified as one of these options.
'conv' — The returned BER is an upper bound
of the BER for binary convolutional codes with coherent BPSK or
'Hamming' — The returned BER is an
approximation of the BER for a Hamming code using hard-decision
decoding and coherent BPSK or QPSK modulation.
'Golay' — The returned BER is an upper
bound of the BER for an extended (24,12) Golay code using
hard-decision decoding and coherent BPSK or QPSK modulation. In
accordance with , the Golay coding upper bound assumes the correction of
3-error patterns only. Even though correcting approximately 19%
of 4-error patterns is theoretically possible, in practice, most
decoders do not have this capability.
'RS' — The returned BER is an approximation
of the BER for an
code using hard-decision decoding and coherent BPSK
decision— Decoding decision type
Decoding decision type, specified as one of these options.
'hard' — Use this option for hard-decision
'soft' — Use this option for unquantized
soft-decision decoding. This option applies only when
coding is set to
coderate— Code rate of convolutional code
Code rate of the convolutional code, specified as a positive scalar.
To enable this argument, set the
dspec— Distance spectrum of code
dfree— Minimum free distance of code
Minimum free distance of the code, specified as a positive scalar.
weight— Weight spectrum of code
Weight spectrum of the code, specified as a positive scalar.
To enable this argument, set the
N— Codeword length
modulation— Modulation type
Modulation decision type, specified as
'msk'. The default
modulation scheme is PSK modulation with a modulation order of 2
(specifically, nondifferential BPSK modulation).
In general, the numerical accuracy for the output BER is limited to approximately two significant digits. The numerical accuracy output by this function is limited by these restrictions.
Approximations in the analysis leading to the closed-form expressions used by the function
Approximations related to the numerical implementation of the expressions
K must produce a
narrow-sense BCH code.
To generate the list of valid
K) pairs and their
corresponding values of error-correction capability, run the command
Valid values for
N have the form
M is an integer in the range [3, 16]. The value of
N cannot exceed 65,535.
You can configure the Theoretical tab in the Bit
Error Rate Analysis app to compute theoretical BER values instead of using the
 Proakis, John G. Digital Communications. 4th ed. New York: McGraw Hill, 2001.
 Frenger, P., P. Orten, and T. Ottosson. “Convolutional Codes with Optimum Distance Spectrum.” IEEE Communications Letters 3, no. 11 (November 1999): 317–19. https://doi.org/10.1109/4234.803468.
 Odenwalder, J. P. Error Control Coding Handbook, Final Report, LINKABIT Corporation, San Diego, CA: 1976.
 Sklar, Bernard. Digital Communications: Fundamentals and Applications. 2nd ed. Upper Saddle River, N.J: Prentice-Hall PTR, 2001.
 Ziemer, R. E., and R. L., Peterson. Introduction to Digital Communication. 2nd ed. Prentice Hall, 2001.