PAPR¶

The PAPR evaluator collects information about the Peak-to-Average Power Ratio (PAPR) of a signal. The PAPR is defined as the ratio of the peak power to the average power
where \(P_{peak}\) is the peak power and \(P_{avg}\) is the average power as indicated by the sum of squared complex voltages divided by the number of samples. Within the context of a simulation, the evaluator can be configured like this:
1# Create a new simulation featuring two devices
2simulation = Simulation()
3device_alpha = simulation.new_device()
4device_beta = simulation.new_device()
5
6# Create a transmitting and receiving modem for each device, respectively
7modem_alpha = TransmittingModem(waveform=RRCWaveform())
8device_alpha.transmitters.add(modem_alpha)
9modem_beta = ReceivingModem(waveform=RRCWaveform())
10device_beta.receivers.add(modem_beta)
11
12# Configure the simulation
13papr = PAPR(device_alpha, AntennaMode.TX)
14simulation.add_evaluator(papr)
15simulation.new_dimension('noise_level', dB(0, 2, 4, 8, 10, 12, 14, 16, 18, 20), device_beta)
16simulation.num_samples = 1000
17result = simulation.run()
- class PAPR(device, direction, confidence=1.0, tolerance=0.0, min_num_samples=1024, plot_scale='linear', tick_format=ValueType.LIN, plot_surface=True)[source]¶
Bases:
ScalarEvaluatorPeak-to-average power ratio (PAPR) evaluator.
Computes the average PAPR of radio-frequency band signals transmitted and received by devices during evaluation runtime.
- Parameters:
device (
Device) – The device to evaluate the PAPR of.direction (
AntennaMode) – The direction of the PAPR evaluation. Can beAntennaMode.TXorAntennaMode.RX.confidence (
float) – Required confidence level for the given tolerance between zero and one.tolerance (
float) – Acceptable non-negative bound around the mean value of the estimated scalar performance indicator.min_num_samples (
int) – Minimum number of samples required to compute the confidence bound.plot_scale (
str) – Scale of the plot. Can be'linear'or'log'.tick_format (
ValueType) – Tick format of the plot.plot_surface (
bool) – Enable surface plotting for two-dimensional grids. Enabled by default.
- evaluate()[source]¶
Evaluate the state of an investigated object.
Implements the process of extracting an arbitrary performance indicator, represented by the returned
Artifact\(X_m\).Returns: Artifact \(X_m\) resulting from the evaluation.
- Return type:
- initialize_result(grid)[source]¶
Initialize the respective result object for this evaluator.
- Parameters:
grid (
Sequence[GridDimensionInfo]) – The parameter grid over which the simulation iterates.- Return type:
Returns: The initialized evaluation result.
- class PAPREvaluation(instantaneous_power)[source]¶
Bases:
Evaluation[PlotVisualization]Peak-to-average power ratio (PAPR) evaluation.
- Parameters:
instantaneous_power (
ndarray) – The instantaneous power in \(V^2\) for each antenna stream.
- artifact()[source]¶
Generate an artifact from this evaluation.
Returns: The evaluation artifact.
- Return type: