<commit_before>.. _simulation_overview:


Overview
--------

.. * describe the BER/FER simulator chains, and EXIT chart (add figures)
.. * detail the command line arguments philosophy:

..    - give a simple example and explain the main arguments (-C -N -K -m -M)
..    - explain the sub-arguments
..    - explain the redundant arguments (--type --implem --help --Help)

.. * tell that it is possible to use an `ini` file

The |AFF3CT| toolbox comes with a simulator dedicated to the **communication
chains**. The simulator focuses on **the channel coding level**. It can be used
to reproduce/validate **state-of-the-art BER/FER performances** as well as an
**exploration tool to bench various configurations**.

Basic Arguments
"""""""""""""""

The |AFF3CT| simulator is a **command line program** which can take many
different arguments. The command line interface make possible to write scripts
that run a battery of simulations for instance.

Here is a minimalist command line using |AFF3CT|:

.. code-block:: bash

   aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0

``-C`` is a required parameter that defines the type of channel code that will
be used in the communication chain (see the :ref:`sim-sim-cde-type` section for
more information). ``-K`` is the number of information bits and ``-N`` is the
frame size (bits transmitted over the channel). The :numref:`fig_sim_code`
illustrates those parameters in a simplified communication chain.

.. _fig_sim_code:

.. figure:: images/sim_code.png
   :figwidth: 70 %
   :align: center

   |SNR|-related parameters in the communication chain.

The simulator computes the |BER| and the |FER| for a |SNR| range (by default the
|SNR| is :math:`E_b/N_0` in dB). ``-m`` is the first |SNR| value to simulate
with and ``-M`` is the last one (see the :ref:`sim-sim-noise-min` and
:ref:`sim-sim-noise-max` sections for more information). ``-s`` is the step
between each |SNR| (c.f. section :ref:`sim-sim-noise-step`). The
:numref:`fig_sim_snr` shows the output |BER| for each simulated |SNR| values.

.. _fig_sim_snr:

.. figure:: images/sim_snr.png
   :figwidth: 60 %
   :align: center

   Noise-related parameters in the communication chain.<commit_msg>Doc: fix bad legend.<commit_after>.. _simulation_overview:


Overview
--------

.. * describe the BER/FER simulator chains, and EXIT chart (add figures)
.. * detail the command line arguments philosophy:

..    - give a simple example and explain the main arguments (-C -N -K -m -M)
..    - explain the sub-arguments
..    - explain the redundant arguments (--type --implem --help --Help)

.. * tell that it is possible to use an `ini` file

The |AFF3CT| toolbox comes with a simulator dedicated to the **communication
chains**. The simulator focuses on **the channel coding level**. It can be used
to reproduce/validate **state-of-the-art BER/FER performances** as well as an
**exploration tool to bench various configurations**.

Basic Arguments
"""""""""""""""

The |AFF3CT| simulator is a **command line program** which can take many
different arguments. The command line interface make possible to write scripts
that run a battery of simulations for instance.

Here is a minimalist command line using |AFF3CT|:

.. code-block:: bash

   aff3ct -C POLAR -K 1723 -N 2048 -m 1.0 -M 4.0 -s 1.0

``-C`` is a required parameter that defines the type of channel code that will
be used in the communication chain (see the :ref:`sim-sim-cde-type` section for
more information). ``-K`` is the number of information bits and ``-N`` is the
frame size (bits transmitted over the channel). The :numref:`fig_sim_code`
illustrates those parameters in a simplified communication chain.

.. _fig_sim_code:

.. figure:: images/sim_code.png
   :figwidth: 70 %
   :align: center

   Code-related parameters in the communication chain.

The simulator computes the |BER| and the |FER| for a |SNR| range (by default the
|SNR| is :math:`E_b/N_0` in dB). ``-m`` is the first |SNR| value to simulate
with and ``-M`` is the last one (see the :ref:`sim-sim-noise-min` and
:ref:`sim-sim-noise-max` sections for more information). ``-s`` is the step
between each |SNR| (c.f. section :ref:`sim-sim-noise-step`). The
:numref:`fig_sim_snr` shows the output |BER| for each simulated |SNR| values.

.. _fig_sim_snr:

.. figure:: images/sim_snr.png
   :figwidth: 60 %
   :align: center

   |SNR|-related parameters in the communication chain.
{'fraction_non_alphanumeric': 0.11961939284096058, 'fraction_numerical': 0.01042138649750793, 'mean_word_length': 3.671957671957672, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2362031', 'n_tokens_mistral': 1411, 'n_tokens_neox': 1326, 'n_words': 592}