============= Communication ============= The communication package contains a propgramming framework for simulating and evaluating communication systems on the physical layer. It is primarily comprised of :doc:`Modem` implementations and associated :doc:`Communication Waveforms`: .. mermaid:: classDiagram class CommunicationWaveform { <> %%+int oversampling_factor %%+int modulation_order %%+int num_data_symbols* %%+int samples_per_frame* %%+float frame_duration %%+float symbol_duration* %%+float bit_energy* %%+float symbol_energy* %%+float power* +map(numpy.ndarray) Symbols* +unmap(Symbols) np.ndarray* +place(Symbols) Symbols* +pick(StatedSymbols) StatedSymbols* +modulate(Symbols) np.ndarray* +demodulate(np.ndarray) Symbols* } class BaseModem { <> +CommunicationWaveform waveform +EncoderManager encoder_manager +SymbolPredocding Precoding +Device transmitting_device* +Device receiving_device* } class TransmittingModem { +Device transmitting_device +None receiving_device +BitsSource bits_source +TransmitStreamCoding transmit_stream_coding #CommunicationTransmission _transmit() } class ReceivingModem { +None transmitting_device +Device receiving_device +BitsSink bits_sink +ReceiveStreamCoding receive_stream_coding #CommunicationReception _receive(Signal) } class SimplexLink class DuplexModem class CommunicationTransmission { +List[CommunicationTransmissionFrame] frames +int num_frames +bits numpy.ndarray +symbols Symbols } class CommunicationReception { +List[CommunicationReceptionFrame] frames +int num_frames +encoded_bits numpy.ndarray +bits numpy.ndarray +symbols Symbols +equalized_symbols Symbols } BaseModem --* CommunicationWaveform TransmittingModem --|> BaseModem TransmittingModem --> CommunicationTransmission : create ReceivingModem --|> BaseModem ReceivingModem --> CommunicationReception : create SimplexLink --|> TransmittingModem SimplexLink --|> ReceivingModem DuplexModem --|> TransmittingModem DuplexModem --|> ReceivingModem link CommunicationWaveform "modem.waveform.html" link BaseModem "modem.modem.BaseModem.html" link TransmittingModem "modem.modem.TransmittingModem.html" link ReceivingModem "modem.modem.ReceivingModem.html" link SimplexLink "modem.modem.SimplexLink.html" link DuplexModem "modem.modem.DuplexModem.html" link CommunicationTransmission "modem.modem.CommunicationTransmission.html" link CommunicationReception "modem.modem.CommunicationReception.html" :doc:`Modems` implement a customizable signal processing pipeline for both :doc:`transmitting` and :doc:`receiving` communication devices, as well as a :doc:`SimplexLink` for unidirectional communication links and a :doc:`DuplexModem` for bidirectional communication links. They can be configured in terms of their :doc:`bit generation` and the :doc:`forward error correction` codings applied to the bits, the :doc:`precoding` applied to communication symbols, and, most importantly, the :doc:`communication waveform` used to transmit and receive commuication symbols. The :doc:`waveform` offers additional specific configuration options for synchronization, channel estimation and channel equalization. The following waveform types are currently supported: .. include:: modem.waveform._table.rst Out of the box, the communication package provides a number of evaluators to estimate common performance metrics of communication systems: .. include:: modem.evaluators._table.rst Setting up a simulation evaluating the performance of a communication system requires adding modems to devices and configuring the respective waveform: .. literalinclude:: ../../_examples/library/getting_started_simulation.py :language: python :linenos: :lines: 08-26 Afterwards, evaluators can be added freely and the simulation can be run: .. literalinclude:: ../../_examples/library/getting_started_simulation.py :language: python :linenos: :lines: 41-49 In the case of hardware evaluations, the waveform and modem configuartions remain the same, however, the devices are replaced by hardware devices initialized from a hardware loop: .. literalinclude:: ../../_examples/library/getting_started_loop.py :language: python :linenos: :lines: 07-27 Then, similarly to the simulation, evaluators can be added and the loop can be run. Additionally, visualizers plotting information generated by the communication system can be added to supervise the evaluation: .. literalinclude:: ../../_examples/library/getting_started_loop.py :language: python :linenos: :lines: 29-43 .. toctree:: :glob: :maxdepth: 1 :hidden: modem.waveform modem.evaluators modem.precoding modem.symbols modem.bits_source modem.modem.TransmittingModem modem.modem.ReceivingModem modem.modem.SimplexLink modem.modem.DuplexModem modem.modem.BaseModem modem.modem.CommunicationTransmission modem.modem.CommunicationTransmissionFrame modem.modem.CommunicationReception modem.modem.CommunicationReceptionFrame