Engee documentation
Notebook

Analysis of the theoretical characteristics of BER for various c AWGN modulation methods

In modern communication systems, the choice of the modulation method plays a key role in ensuring the reliability and efficiency of data transmission. One of the main indicators characterizing the quality of communication is the probability of a bit Error Rate (BER), which depends on the signal-to-noise ratio (Eb/No). This demonstration provides a theoretical analysis of BER for various modulation methods, including M-PSK (BPSK, QPSK, 8-PSK), M-QAM (16-QAM, 64-QAM) and M-FSK (2-FSK, 4-FSK), in an additive white Gaussian noise channel..

Accurate and approximated formulas were used to calculate BER, taking into account the specifics of each modulation method. The results are visualized in the form of a graph, which allows you to visually compare the effectiveness of various modulation methods depending on the change in Eb/No. This analysis helps engineers and researchers choose the best modulation methods for specific communication conditions, taking into account the trade-off between data transfer rate and noise tolerance.

In [ ]:
using SpecialFunctions

Function berawgn_psk calculates the theoretical bit error probability (BER) for M-PSK modulations in the AWGN channel using the exact formula for BPSK (M=2) — 0.5 * erfc(sqrt(EbNo)), where erfc — an additional error function, and for M>2 applies an approximation erfc(sqrt(k * EbNo) * sin(π/M)) / k, which takes into account the number of bits per character (k = log2(M)) and the geometry of the constellation (via sin(π/M)). Both formulas depend on the linear signal-to-noise ratio EbNo = 10^(EbNo_dB/10) converted from decibels.

In [ ]:
function berawgn_psk(EbNo_dB, M)
    EbNo = 10 .^ (EbNo_dB ./ 10)
    k = log2(M)
    if M == 2
        return 0.5 .* erfc.(sqrt.(EbNo))
    else
        return erfc.(sqrt.(k .* EbNo) .* sin(π/M)) / k
    end
end
Out[0]:
berawgn_psk (generic function with 1 method)

Function berawgn_qam calculates the theoretical probability of bit error (BER) for quadrature amplitude modulations (M-QAM, such as 16-QAM, 64-QAM) in an AWGN-noise channel. She uses an exact formula for square constellations, where:

  • EbNo = 10^(EbNo_dB/10) — linear signal-to-noise ratio,
  • k = log2(M) — the number of bits per character,
  • erfc — additional error function,
  • multipliers 4/k and (1 - 1/sqrt(M)) The geometry of the constellation and the probability of error for different bit combinations are taken into account. The formula is effective for square QAM.
In [ ]:
function berawgn_qam(EbNo_dB, M)
    EbNo = 10 .^ (EbNo_dB ./ 10)
    k = log2(M)
    return (4/k) .* (1 - 1/sqrt(M)) .* 0.5 .* erfc.(sqrt.(3*k.*EbNo./(2*(M-1))))
end
Out[0]:
berawgn_qam (generic function with 1 method)

Function berawgn_fsk Calculates the theoretical probability of bit error (BER) for M-FSK (frequency manipulation) modulations in an AWGN-noise channel, supporting two detection modes. For coherent reception (with accurate phase information), the formula is used, where:

  • EbNo = 10^(EbNo_dB/10) — linear signal-to-noise ratio,
  • k = log2(M) — the number of bits per character,
  • erfc — additional error function.
    The function takes into account the increase in errors with growth M (using a multiplier (M-1)/M or (M-1)/2) and the dependence on energy per bit (k*EbNo). The mode is set by the parameter coherent=true/false. Suitable for analyzing 2-FSK, 4-FSK and other orthogonal circuits.
In [ ]:
function berawgn_fsk(EbNo_dB, M; coherent=true)
    EbNo = 10 .^ (EbNo_dB ./ 10)
    k = log2(M)
    if coherent
        return ((M-1)/M) .* erfc.(sqrt.(k.*EbNo./2))
    else
        return ((M-1)/2) .* exp.(-k.*EbNo./2)
    end
end
Out[0]:
berawgn_fsk (generic function with 1 method)

Now let's turn to a comparative analysis of modulations with an identical signal-to-noise ratio.

In [ ]:
EbNo_dB = -15:1:15 # Диапазон Eb/No для анализа

p = plot(EbNo_dB, berawgn_psk(EbNo_dB, 2), label="BPSK", marker=:circle, markersize=4)
plot!(EbNo_dB, berawgn_psk(EbNo_dB, 4), label="QPSK", marker=:rect, markersize=4)
plot!(EbNo_dB, berawgn_psk(EbNo_dB, 8), label="8-PSK", marker=:diamond, markersize=4)
plot!(EbNo_dB, berawgn_qam(EbNo_dB, 16), label="16-QAM", marker=:utriangle, markersize=4)
plot!(EbNo_dB, berawgn_qam(EbNo_dB, 64), label="64-QAM", marker=:dtriangle, markersize=4)
plot!(EbNo_dB, berawgn_fsk(EbNo_dB, 2), label="2-FSK", marker=:pentagon, markersize=4)
plot!(EbNo_dB, berawgn_fsk(EbNo_dB, 4), label="4-FSK", marker=:hexagon, markersize=4)

xlabel!("Eb/No (dB)", fontsize=12)
ylabel!("Bit Error Rate (BER)", fontsize=12)
title!("Теоретические BER для различных модуляций", fontsize=14)
Out[0]:
In [ ]:
plot(p, yscale = :log10)
Out[0]:

Conclusion

The analysis of the theoretical characteristics of BER for various modulation methods demonstrates their diverse behavior depending on the signal-to-noise ratio (Eb/No). As can be seen from the graph, BPSK and QPSK modulation methods show better noise tolerance at low Eb/No values, which makes them ideal for weak signal conditions. However, with an increase in Eb/No, higher-level modulation methods such as 16-QAM and 64-QAM provide higher spectral efficiency, although they require a higher signal-to-noise ratio to achieve comparable BER values.

M-FSK modulation methods, especially 2-FSK and 4-FSK, exhibit intermediate characteristics, which makes them applicable in specific scenarios where simplicity of implementation and resistance to frequency deviations are important. The results obtained emphasize the importance of choosing a modulation method depending on the specific requirements of the communication system, such as the allowable error probability, available bandwidth, and energy constraints.

Thus, our analysis provides valuable information for the design and optimization of communication systems, allowing us to choose the optimal modulation methods for various operating conditions.