Rectangular¶

The recangular waveform is a single-carrier modulation scheme filtering the communication symbols with rectangle pulse shape:
(
|
(
|
The waveform can be configured by specifying the number of number of data- and preamble symbols contained within each frame, as well as the considered symbol rate:
1# Initialize the waveform description
2waveform = RectangularWaveform(
3 num_preamble_symbols=16,
4 num_data_symbols=32,
5 modulation_order=64,
6)
7
8# Configure the waveform's synchronization routine
Afterwards, additional processing steps such as synchronization, channel estimation, equalization, and the pilot symbol sequence can be added to the waveform:
1
2# Configure the waveform's channel estimation routine
3waveform.channel_estimation = SingleCarrierLeastSquaresChannelEstimation()
4
5# Configure the waveform's channel equalization routine
6waveform.channel_equalization = SingleCarrierZeroForcingChannelEqualization()
7
8# Configure the waveform's pilot symbol sequence
9waveform.pilot_symbol_sequence = CustomPilotSymbolSequence(
10 np.exp(.25j * np.pi * np.array([0, 1, 2, 3]))
11)
12
13# Initialize a new simulation considering a single device
In order to generate and evaluate communication transmissions or receptions, waveforms should be added to modem implementations.
Refer to Transmitting Modem, Receiving Modem or Simplex Link for more information.
For instructions how to implement custom waveforms, refer to Implementing Communication Waveforms.
- class RectangularWaveform(num_preamble_symbols=16, num_data_symbols=256, num_postamble_symbols=0, pilot_rate=0, guard_interval=0.0, pilot_symbol_sequence=None, repeat_pilot_symbol_sequence=True, **kwargs)[source]¶
Bases:
FilteredSingleCarrierWaveform,SerializableRectangular filtered single carrier modulation.
- Parameters:
num_preamble_symbols (
int) – Number of preamble symbols within a single communication frame.num_data_symbols (
int) – Number of data symbols within a single communication frame.num_postamble_symbols (
int) – Number of postamble symbols within a single communication frame.guard_interval (
float) – Guard interval between communication frames in seconds. Zero by default.pilot_rate (
int) – Pilot symbol rate. Zero by default, i.e. no pilot symbols.pilot_symbol_sequence (
PilotSymbolSequence|None) – The configured pilot symbol sequence. Uniform by default.repeat_pilot_symbol_sequence (
bool) – Allow the repetition of pilot symbol sequences. Enabled by default.kwargs (
Any) – Waveform generator base class initialization parameters.
- symbol_energy(bandwidth, oversampling_factor)[source]¶
Expected energy of a single communication symbol within the modulated baseband-signal.
- Parameters:
Typically denoted by \(E_s\). HermesPy defines the symbol energy as the expected sum of squared magnitudes
\[E_s = \sum_{n=0}^{N-1} |x[n]|^2\]where \(x[n]\) are the complex base-band samples of a single communication symbol.
- Returns:
The expected symbol energy.
- Return type: