Power Amplifier¶
The power amplifier is usually the last stage in a transmitting device’s radio frequency chain before the antenna. This base model is HermesPy’s default power amplifier model, which is a linear amplifier with a constant gain and therfore no distortion
which may be overwritten by classes inheriting from this base.
- class PowerAmplifier(saturation_amplitude=inf, adjust_power=False)[source]¶
Bases:
Serializable
Base class of a distorionless power-amplifier model.
- Parameters:
- model(input_signal)[source]¶
Model signal amplification characteristics.
- Parameters:
input_signal (np.ndarray) – Sample vector of the signal feeding into the power amplifier.
- Returns:
Distorted signal after amplification modeling.
- Return type:
np.ndarray
- plot_characteristics(axes=None, *, title=None, samples=None)[source]¶
Plot the power amplifier distortion characteristics.
Generates a matplotlib plot depicting the phase/amplitude.
- Parameters:
axes (VAT, optional) – The axis object into which the information should be plotted. If not specified, the routine will generate and return a new figure.
title (str, optional) – Title of the generated plot.
samples (np.ndarray, optional) – Sample points at which to evaluate the characteristics. In other words, the x-axis of the resulting characteristics plot.
- Return type:
- send(input_signal)[source]¶
Model signal amplification characteristics.
Internally calls the model subroutine of power-amplifier models implementing this prototype-class.
- Parameters:
input_signal (np.ndarray) – Sample vector of the signal feeding into the power amplifier.
- Returns:
Distorted signal after amplification modeling.
- Return type:
np.ndarray
- adjust_power: bool¶
Power adjustment flag.
If enabled, the power amplifier will normalize the distorted signal after propagation modeling.
- property saturation_amplitude: float¶
Cut-off point for the linear behaviour of the amplification.
Referred to as \(s_\mathrm{sat} \ \mathbb{R}_{+}\) in equations.
- Returns:
Saturation amplitude in Volt.
- Return type:
- Raises:
ValueError – If amplitude is smaller than zero.