Filtered Single Carrier Waveforms
- class FilteredSingleCarrierWaveform(symbol_rate, num_preamble_symbols, num_data_symbols, num_postamble_symbols=0, pilot_rate=0, guard_interval=0.0, oversampling_factor=4, pilot_symbol_sequence=None, repeat_pilot_symbol_sequence=True, **kwargs)
Bases:
ConfigurablePilotWaveform
This method provides a class for a generic PSK/QAM modem.
The modem has the following characteristics: - root-raised cosine filter with arbitrary roll-off factor - arbitrary constellation, as defined in modem.tools.psk_qam_mapping:PskQamMapping
This implementation has currently the following limitations: - hard output only (no LLR) - no reference signal - ideal channel estimation - equalization of ISI with FMCW in AWGN channel only - no equalization (only amplitude and phase of first propagation path is compensated)
Waveform Generator PSK-QAM initialization.
- Parameters
symbol_rate (float) – Rate at which symbols are being generated in Hz.
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, optional) – Number of postamble symbols within a single communication frame.
guard_interval (float, optional) – Guard interval between communication frames in seconds. Zero by default.
oversampling_factor (int, optional) – The oversampling factor of the waform.
pilot_rate (int, optional) – Pilot symbol rate. Zero by default, i.e. no pilot symbols.
pilot_symbol_sequence (Optional[PilotSymbolSequence], optional) – The configured pilot symbol sequence. Uniform by default.
repeat_pilot_symbol_sequence (bool, optional) – Allow the repetition of pilot symbol sequences. Enabled by default.
kwargs (Any) – Waveform generator base class initialization parameters.
- property symbol_rate: float
Repetition rate of symbols.
- Return type
float
- Returns
Symbol rate in Hz.
- Raises
ValueError – For rates smaller or equal to zero.
- property num_preamble_symbols: int
Number of preamble symbols.
Transmitted at the beginning of communication frames.
Returns: The number of symbols.
- Raises
ValueError – If the number of symbols is smaller than zero.
- Return type
int
- property num_postamble_symbols: int
Number of postamble symbols.
Transmitted at the end of communication frames.
Returns: The number of symbols.
- Raises
ValueError – If the number of symbols is smaller than zero.
- Return type
int
- property modulation_order: int
Access the modulation order.
- Returns
The modulation order.
- Return type
int
- property pilot_signal: Signal
Model of the pilot sequence within this communication waveform.
- Returns
The pilot sequence.
- Return type
- map(bits)
Map a stream of bits to data symbols.
- Parameters
data_bits (np.ndarray) – Vector containing a sequence of L hard data bits to be mapped onto data symbols.
- Returns
Mapped data symbols.
- Return type
- unmap(symbols)
Map a stream of data symbols to data bits.
- Parameters
symbols (Symbols) – Sequence of K data symbols to be mapped onto bit sequences.
- Returns
Vector containing the resulting sequence of L data bits In general, L is greater or equal to K.
- Return type
np.ndarray
- modulate(symbols)
Modulate a stream of data symbols to a base-band signal containing a single data frame.
- demodulate(signal)
Demodulate a base-band signal stream to data symbols.
- Parameters
signal (np.ndarray) – Vector of complex-valued base-band samples of a single communication frame.
- Return type
- Returns
The demodulated communication symbols
- property num_pilot_samples: int
Number of samples within the pilot section of a frame.
- Returns
Number of pilot samples.
- Return type
int
- property num_guard_samples: int
Number of samples within the guarding section of a frame.
- Returns
Number of samples.
- Return type
int
- property guard_interval: float
Frame guard interval.
- Returns
Interval in seconds.
- Return type
float
- property pilot_rate: int
Repetition rate of pilot symbols within the frame.
A pilot rate of zero indicates no pilot symbols within the data frame.
- Return type
int
- Returns
Rate in number of symbols
- Raises
ValueError – If the pilot rate is smaller than zero.
- property num_data_symbols: int
Number of data symbols per frame.
- Returns
Number of data symbols.
- Return type
int
- property samples_in_frame: int
The number of discrete samples per generated frame.
- Returns
The number of samples.
- Return type
int
- property bits_per_frame: int
Number of bits required to generate a single data frame.
- Returns
Number of bits
- Return type
int
- property symbols_per_frame: int
Number of dat symbols per transmitted frame.
- Returns
Number of data symbols
- Return type
int
- property bit_energy: float
Returns the theoretical average (discrete-time) bit energy of the modulated baseband_signal.
Energy of baseband_signal \(x[k]\) is defined as \(\sum{|x[k]}^2\) Only data bits are considered, i.e., reference, guard intervals are ignored.
- Return type
float
- property symbol_energy: float
The theoretical average symbol (discrete-time) energy of the modulated baseband_signal.
Energy of baseband_signal \(x[k]\) is defined as \(\sum{|x[k]}^2\) Only data bits are considered, i.e., reference, guard intervals are ignored.
- Return type
float
- Returns
The average symbol energy in UNIT.
- property power: float
Returns the theoretical average symbol (unitless) power,
Power of baseband_signal \(x[k]\) is defined as \(\sum_{k=1}^N{|x[k]|}^2 / N\) Power is the average power of the data part of the transmitted frame, i.e., bit energy x raw bit rate
- Return type
float
- property sampling_rate: float
Rate at which the waveform generator signal is internally sampled.
- Returns
Sampling rate in Hz.
- Return type
float
- plot_filter_correlation()
Plot the convolution between transmit and receive filter shapes.
- Return type
Figure
- Returns
Handle to the generated matplotlib figure.
- plot_filter()
Plot the transmit filter shape.
- Return type
Figure
- Returns
Handle to the generated matplotlib figure.
- class SingleCarrierSynchronization(waveform_generator=None, *args)
Bases:
Synchronization
[FilteredSingleCarrierWaveform
]Synchronization for chirp-based frequency shift keying communication waveforms.
- Parameters
waveform_generator (WaveformGenerator, optional) – The waveform generator this synchronization routine is attached to.
- class SingleCarrierCorrelationSynchronization(threshold=0.9, guard_ratio=0.8, *args, **kwargs)
Bases:
CorrelationSynchronization
[FilteredSingleCarrierWaveform
]Correlation-based clock-synchronization for PSK-QAM waveforms.
- Parameters
threshold (float, optional) – Correlation threshold at which a pilot signal is detected.
guard_ratio (float, optional) – Guard ratio of frame duration.
*args (
Any
) – Synchronization base class initialization parameters.
- yaml_tag: Optional[str] = 'SC-Correlation'
YAML serialization tag.
- class SingleCarrierChannelEstimation(waveform_generator=None, *args)
Bases:
ChannelEstimation
[FilteredSingleCarrierWaveform
],ABC
Channel estimation for Psk Qam waveforms.
- Parameters
waveform_generator (WaveformGenerator, optional) – The waveform generator this synchronization routine is attached to.
- class SingleCarrierIdealChannelEstimation(waveform_generator=None)
Bases:
IdealChannelEstimation
[FilteredSingleCarrierWaveform
],Serializable
Ideal channel estimation for single carrier waveforms
- Parameters
waveform_generator (WaveformGenerator, optional) – The waveform generator this estimation routine is attached to.
- yaml_tag: Optional[str] = 'SC-Ideal'
YAML serialization tag
- class SingleCarrierLeastSquaresChannelEstimation(waveform_generator=None, *args)
Bases:
SingleCarrierChannelEstimation
Least-Squares channel estimation for Psk Qam waveforms.
- Parameters
waveform_generator (WaveformGenerator, optional) – The waveform generator this synchronization routine is attached to.
- yaml_tag: Optional[str] = 'SC-LS'
YAML serialization tag
- class SingleCarrierChannelEqualization(waveform_generator=None)
Bases:
ChannelEqualization
[FilteredSingleCarrierWaveform
],ABC
Channel estimation for Psk Qam waveforms.
- Parameters
waveform_generator (WaveformGenerator, optional) – The waveform generator this equalization routine is attached to.
- class SingleCarrierZeroForcingChannelEqualization(waveform_generator=None)
Bases:
ZeroForcingChannelEqualization
[FilteredSingleCarrierWaveform
]Zero-Forcing Channel estimation for Psk Qam waveforms.
- Parameters
waveform_generator (WaveformGenerator, optional) – The waveform generator this equalization routine is attached to.
- yaml_tag: Optional[str] = 'SC-ZF'
YAML serialization tag
- class SingleCarrierMinimumMeanSquareChannelEqualization(waveform_generator=None)
Bases:
SingleCarrierChannelEqualization
,ABC
Minimum-Mean-Square Channel estimation for Psk Qam waveforms.
- Parameters
waveform_generator (WaveformGenerator, optional) – The waveform generator this equalization routine is attached to.
- yaml_tag: Optional[str] = 'SC-MMSE'
YAML serialization tag
- class RolledOffSingleCarrierWaveform(relative_bandwidth=1.0, roll_off=0.0, filter_length=16, *args, **kwargs)
Bases:
FilteredSingleCarrierWaveform
Base class for single carrier waveforms applying linear filters longer than a single symbol duration.
- Parameters
relative_bandwidth (float, optional) – Bandwidth relative to the configured symbol rate. One by default, meaning the pulse bandwidth is equal to the symbol rate in Hz, assuming zero roll_off.
roll_off (float, optional) – Filter pulse shape roll off factor between zero and one. Zero by default, meaning no inter-symbol interference at the sampling instances.
filter_length (float, optional) – Filter length in modulation symbols. 16 by default.
- property filter_length: int
Filter length in modulation symbols.
Configures how far the shaping filter stretches in terms of the number of modulation symbols it overlaps with.
- Return type
int
- Returns
Filter length in number of modulation symbols.
- Raises
ValueError – For filter lengths smaller than one.
- property relative_bandwidth: float
Bandwidth relative to the configured symbol rate.
- Raises
ValueError – On values smaller or equal to zero.
- Return type
float
- property roll_off: float
Filter pulse shape roll off factor.
- Raises
ValueError – On values smaller than zero or larger than one.
- Return type
float
- property bandwidth: float
Bandwidth of the frame generated by this generator.
Used to estimate the minimal sampling frequency required to adequately simulate the scenario.
- Returns
Bandwidth in Hz.
- Return type
float
- class RootRaisedCosineWaveform(*args, **kwargs)
Bases:
RolledOffSingleCarrierWaveform
,Serializable
Root-Raised-Cosine filtered single carrier mdulation.
(Source code, png, hires.png, pdf)
(Source code, png, hires.png, pdf)
- Parameters
relative_bandwidth (float, optional) – Bandwidth relative to the configured symbol rate. One by default, meaning the pulse bandwidth is equal to the symbol rate in Hz, assuming zero roll_off.
roll_off (float, optional) – Filter pulse shape roll off factor between zero and one. Zero by default, meaning no inter-symbol interference at the sampling instances.
filter_length (float, optional) – Filter length in modulation symbols. 16 by default.
- yaml_tag: Optional[str] = 'SC-RootRaisedCosine'
YAML serialization tag
- class RaisedCosineWaveform(*args, **kwargs)
Bases:
RolledOffSingleCarrierWaveform
,Serializable
Root-Raised-Cosine filtered single carrier mdulation.
(Source code, png, hires.png, pdf)
(Source code, png, hires.png, pdf)
- Parameters
relative_bandwidth (float, optional) – Bandwidth relative to the configured symbol rate. One by default, meaning the pulse bandwidth is equal to the symbol rate in Hz, assuming zero roll_off.
roll_off (float, optional) – Filter pulse shape roll off factor between zero and one. Zero by default, meaning no inter-symbol interference at the sampling instances.
filter_length (float, optional) – Filter length in modulation symbols. 16 by default.
- yaml_tag: Optional[str] = 'SC-RaisedCosine'
YAML serialization tag
- class RectangularWaveform(relative_bandwidth=1.0, *args, **kwargs)
Bases:
Serializable
,FilteredSingleCarrierWaveform
Rectangular filtered single carrier modulation.
(Source code, png, hires.png, pdf)
(Source code, png, hires.png, pdf)
- yaml_tag: Optional[str] = 'SC-Rectangular'
YAML serialization tag
- property relative_bandwidth: float
Bandwidth relative to the configured symbol rate.
- Raises
ValueError – On values smaller or equal to zero.
- Return type
float
- property bandwidth: float
Bandwidth of the frame generated by this generator.
Used to estimate the minimal sampling frequency required to adequately simulate the scenario.
- Returns
Bandwidth in Hz.
- Return type
float
- class FMCWWaveform(bandwidth, chirp_duration=0.0, *args, **kwargs)
Bases:
Serializable
,FilteredSingleCarrierWaveform
Frequency Modulated Continuous Waveform Filter Modulation Scheme.
(Source code, png, hires.png, pdf)
(Source code, png, hires.png, pdf)
- Parameters
bandwidth (float) – The chirp bandwidth in Hz.
chirp_duration (float, optional) – Duration of each FMCW chirp in seconds. By default, the inverse symbol rate is assumed.
- yaml_tag: Optional[str] = 'SC-FMCW'
YAML serialization tag
- property_blacklist: Set[str] = {'pilot_symbol_sequence'}
Set of properties to be ignored during serialization.
- property chirp_duration: float
FMCW Chirp duration.
A duration of zero will result in the inverse symbol rate as chirp duration.
- Return type
float
- Returns
Chirp duration in seconds.
- Raises
ValueError – If the duration is smaller than zero.
- property bandwidth: float
Bandwidth of the frame generated by this generator.
Used to estimate the minimal sampling frequency required to adequately simulate the scenario.
- Returns
Bandwidth in Hz.
- Return type
float
- property chirp_slope: float
Chirp slope.
The slope is equal to the chirp bandwidth divided by its duration.
- Return type
float
- Returns
Slope in Hz/s.