BER using semianalytic technique
semianalytic function computes the bit error rate
(BER) of a communication system for the specified energy per bit to noise power spectral
levels by using the semianalytic technique. The system transmits complex baseband signal
txsig and receives noiseless complex baseband signal
rxsig. The function filters the received signal
rxsig and determines the symbol error probability of each
received IQ symbol by analytically applying a Gaussian noise distribution to each
complex value. The function averages the error probabilities over the entire received
signal to determine the overall error probability. For each symbol error probability,
the function returns a BER, assuming a Gray-coded constellation. For more information,
see When to Use Semianalytic Technique.
returns the BER of the system for the transmitted signal
ber = semianalytic(
received noiseless signal
rxsig, modulation type
modtype, and modulation order
function uses an ideal integrator to filter
Nsamp is the number of samples per symbol for each signal.
The returned BER values correspond to the default
levels in the range [0, 20] in dB.
Use the semianalytic technique for BER analysis using a 16-QAM modulated signal. Compare the error rates obtained from the semianalytic technique with the theoretical error rates obtained from published formulas and computed using the
Generate a message signal. To obtain accurate results, the signal must be at least long. is the modulation order of the signal, and is the length of the channel impulse response.
M = 16; % Alphabet size of modulation L = 1; % Length of impulse response of channel msg = [0:M-1 0]; % M-ary message sequence of length greater than M^L
Modulate the message signal using baseband modulation.
modsig = qammod(msg',M); % Modulate data Nsamp = 16; modsig = rectpulse(modsig,Nsamp); % Rectangular pulse shaping
Apply a transmitter filter.
txsig = modsig; % No filter in this example
txsig through a noiseless channel, applying a static phase offset of 1 degree.
rxsig = txsig*exp(1i*pi/180);
Specify the receiver filter as a pair of input arguments. In this case,
den represent an ideal integrator.
num = ones(Nsamp,1)/Nsamp; den = 1; EbNo = 0:20; ber = semianalytic(txsig,rxsig,'qam',M,Nsamp,num,den,EbNo);
For comparison, calculate theoretical BER.
bertheory = berawgn(EbNo,'qam',M);
Plot the computed BER and theoretical BER. The differences between the theoretical and semianalytic error rates are due to the phase offset added to the 16-QAM signal.
semilogy(EbNo,ber,'k*'); hold on; semilogy(EbNo,bertheory,'ro'); title('Semianalytic BER Versus Theoretical BER'); xlabel('E_b/N_o (dB)'); legend('Semianalytic BER with phase offset',... 'Theoretical BER without phase offset','Location','SouthWest'); hold off; grid on;
txsig— Transmitted baseband signal
Transmitted baseband signal, specified as a complex vector.
txsig must contain at least
M is the modulation order of the signal and
L is the length of the channel impulse response in
symbols. For more information on how to generate a transmitted baseband
signal to use in this function, see Procedure for Using Semianalytic Technique.
Complex Number Support: Yes
rxsig— Received noiseless baseband signal
Received noiseless baseband signal, specified as a complex vector.
Complex Number Support: Yes
modtype— Modulation type
Modulation type, specified as one of these options in this table.
|Modulation Scheme||Valid Values of Input
|Differential phase shift keying (DPSK)||2 or 4|
|Minimum shift keying (MSK) with differential encoding, which is equivalent to conventional MSK||2|
|Minimum shift keying (MSK) with nondifferential encoding, which is equivalent to precoded MSK||2|
|Phase shift keying (PSK) with differential encoding||2 or 4|
|Phase shift keying (PSK) with nondifferential encoding||2, 4, 8, 16, 32, or 64|
|Offset quadrature phase shift keying (OQPSK)||4|
|Quadrature amplitude modulation (QAM)||4, 8, 16, 32, 64, 128, 256, 512, or 1024|
M— Modulation order
Modulation order, specified as a power of two. Valid modulation order
values depend on the specified modulation type, as described in the
Nsamp— Number of samples per symbol of received and transmitted signals
Number of samples per symbol of received and transmitted signals, specified as a positive integer.
num— Numerator coefficients of receiver filter
Numerator coefficients of the receiver filter in descending polynomial
powers, specified as a numeric row vector. If you do not specify this input,
the function sets
num to a default value to model an
ideal integrator. The function bases the default value on the
modtype input, as this table shows.
den— Denominator coefficients of receiver filter
1(default) | numeric row vector
Denominator coefficients of the receiver filter in descending polynomial powers, specified as a numeric row vector. The default value corresponds to an ideal integrator.
EbNo— Eb/N0 levels
[0:20](default) | numeric scalar | numeric vector
Eb/N0 levels in dB, specified as a numeric scalar or numeric vector.
BER, returned as a numeric scalar or numeric vector. The function computes
the BER for the
levels that you specify for the
EbNo input. If
EbNo is a vector, then the output
ber is a vector of the size of
EbNo and consists of elements corresponding to the
ber is an upper bound on the BER for
these modulation schemes.
avgampl— Mean signal amplitude of received signal
Mean signal amplitude of the I and Q components of the received signal after filtering and decimating the signal to the symbol rate, returned as a complex number.
Complex Number Support: Yes
avgpower— Mean power of received signal
Mean power of the received signal after filtering and sampling the signal at the symbol rate, returned as a numeric scalar.
semianalytic function makes several assumptions about the
communication system. To find out whether your communication system is suitable for the
semianalytic technique and the
semianalytic function, see When to Use Semianalytic Technique.
The Monte-Carlo simulation described in the Performance Results via Simulation section effectively calculates the BER for a variety of communication systems but can be prohibitively time-consuming for small error rates (for example, error rates of 10-6 or less). The semianalytic technique is an alternative way to compute error rates. This technique can produce results faster than a nonanalytic method that uses only simulated data.
To apply the semianalytic technique, the communication system must satisfy these characteristics.
Any effects of multipath fading, quantization, and amplifier nonlinearities must precede the effects of noise in the modeled channel.
The receiver is perfectly synchronized with the carrier, and timing jitter is negligible. Because phase noise and timing jitter can be slow processes, they can reduce the applicability of the semianalytic technique to a communication system.
The noiseless simulation has no errors in the received signal constellation. Distortions from sources other than noise must be mild enough to keep each signal point in its correct decision region. For instance, if the modeled system has a phase rotation that places the received signal points outside of their proper decision regions, then the semianalytic technique is not suitable to predict system performance.
If the communication system does not satisfy these characteristics, the calculated
BER can be lower than expected. The
assumes that the noise in the modeled channel is Gaussian. For details on how to
adapt the semianalytic technique for non-Gaussian noise, see the discussion of
generalized exponential distributions in .
These steps describe how to implement the semianalytic technique
by using the
Generate a message signal containing at least
M is the modulation order, and
L is the length of the impulse response of the
channel in symbols. Start with an augmented binary pseudonoise (PN)
sequence of length
An augmented PN sequence is a PN sequence with an extra zero appended to
it, which makes the distribution of ones and zeros equal.
Modulate a carrier with the message signal by using one of the
baseband modulation types that
supports. For an overview, see the
modtype input. Shape the resultant signal with
rectangular pulse shaping, using an oversampling factor that you use
later for filtering the modulated signal. Use the result of this step as
txsig when you call the
Filter the modulated signal with a transmit filter. This filter is often a square-root raised cosine filter, but you can also use a Butterworth, Bessel, Chebyshev type 1 or 2, elliptic, or more general FIR or IIR filter. If you use a square-root raised cosine filter, use the filter on the nonoversampled modulated signal, and specify the oversampling factor in the filtering function. You can apply the other filters to the rectangularly pulse shaped signal.
Pass the filtered signal through a noiseless channel. This channel can
include multipath fading effects, phase shifts, amplifier
nonlinearities, quantization, and additional filtering, but it must not
include noise. Use the result of this step as the
rxsig input when you call the
semianalytic function, specifying the
transmitted and received signals,
rxsig, obtained in the previous steps.
Optionally, you can specify a custom receiver filter by using the
den inputs or custom
levels by using the
 Jeruchim, Michel C., Philip Balaban, and K. Sam Shanmugan. Simulation of Communication Systems. Second edition. Boston, MA: Springer US, 2000.
 Pasupathy, S., "Minimum Shift Keying: A Spectrally Efficient Modulation". IEEE Communications Magazine, July, 1979, pp. 14–22.